View source: R/plot_shapefile.R
plot_shapefile | R Documentation |
Plots shapefile
plot_shapefile(polygons, crs = 4269, filterPolygons = NULL)
polygons |
sf object. The polygons (shapefile) |
crs |
Character string. Defines the coordinate reference system for projection. Default = 4269 (NAD83) |
filterPolygons |
Numeric Vector. (Default = NULL) Set of polygons to plot in a differnt color |
A figure
Other plotting:
plot_data_area()
## Not run:
# Read in shapefile
area <- sf::st_read(dsn = system.file("extdata","strata.shp",package="survdat"),quiet=T)
plot_shapefile(polygons=area)
# Plots shapefile and highlights GB region
GB <- c(1090, 1130:1210, 1230, 1250, 3460, 3480, 3490, 3520:3550)
plot_shapefile(polygons=area,filterPolygons = GB)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.