Skip to content

Instantly share code, notes, and snippets.

@rCarto

rCarto/NA.md Secret

Created February 26, 2021 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rCarto/cd6892c410b89dd29ac822c2c019112b to your computer and use it in GitHub Desktop.
Save rCarto/cd6892c410b89dd29ac822c2c019112b to your computer and use it in GitHub Desktop.
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment