Error in round (transform (x), digits): non-numeric argument to mathematical function
My code:
leaflet(br_munic) %>% addProviderTiles(providers$OpenStreetMap) %>% addPolygons(
fill = T, stroke = F, fillColor = pal(br_munic@data$x),smoothFactor = 0.2, fillOpacity = 0.5,
label = paste0(br_munic@data$NOME_MUN, ": ", formatC(br_munic@data$x, big.mark = ","))) %>%
addLegend(pal = pal, values = br_munic@data$x, opacity = 1.0)
}