View source: R/zones_to_raster.R
zones_to_raster | R Documentation |
Convert zones to rasters
zones_to_raster(v, resolution, variables, ...)
v |
An sf object (POLYGON or MULTIPOLYGON) |
resolution |
A numeric vector of length 1 or 2 to set the resolution |
variables |
A character vector with columns names from |
... |
Additional arguments as for |
a SpatRaster
library(sf)
library(terra)
plot(pop_vector)
popdens_raster = zones_to_raster(pop_vector, resolution = 30,
variables = c("ASIAN", "BLACK", "HISPANIC", "OTHER", "WHITE"))
plot(popdens_raster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.