Is there a way with Leaflet in R to have layer controls unchecked by default? I've got an addCircleMarkers layer that I want unchecked when the map loads. Here's the code snippet (I know it's not reproducible, but I'm hoping there's a simple way to do this that doesn't require running all the code).
mymap%>%addCircleMarkers(data=mydata, weight = 1,color="red",radius = ~sqrt(DataPoint),group="NewLayer")%>%
addLayersControl(overlayGroups = c("NewLayer"),options = layersControlOptions(collapsed = FALSE))
I found this posting that describes it using leaflet directly in js, but I'm not an expert coder in js and am relying on the R interface: Check/uncheck overlays in groupedlayercontrol.js
mymap %>% hideGroup("NewLayer")