Convert zones to rasters
zones_to_raster(v, resolution, variables, ...)
An sf object (POLYGON or MULTIPOLYGON)
A numeric vector of length 1 or 2 to set the resolution
A character vector with columns names from v
.
The values from these columns will be (1) rasterized and (2) recalculated to densities.
Each column will be represented as an layer in the output RasterStack
Additional arguments as for terra::rasterize()
a SpatRaster