library(cartography)
library(sf)
#> Linking to GEOS 3.7.1, GDAL 3.1.2, PROJ 7.1.0
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="cartography"))
#> Reading layer `mtq' from data source `/home/tim/R/x86_64-pc-linux-gnu-library/4.0/cartography/gpkg/mtq.gpkg' using driver `GPKG'
#> Simple feature collection with 34 features and 7 fields
#> geometry type: MULTIPOLYGON
#> dimension: XY
#> bbox: xmin: 690574 ymin: 1592536 xmax: 735940.2 ymax: 1645660
#> projected CRS: WGS 84 / UTM zone 20N
mtq[1:5, "MED"] <- NA
choroLayer(x = mtq, var = "MED", colNA = "red")
Created on 2021-02-26 by the reprex package (v1.0.0)