View source: R/cv_clip_basin.R
cv_clip_basin | R Documentation |
Takes the SpatRaster
that represents zones and areas and
clips them from polygon basin
cv_clip_basin(za_rast, basin)
za_rast |
|
basin |
|
Returns a list with 3 elements: 1) raster
(rasters of cell areas for each zone),
2) area
total area of each zone in the basin, and 3) zone
zone numbers.
Kostas Andreadis
cv_basin_daily_precip
{
library(terra)
az_raster <- cv_zone_area_raster()
fpath <- system.file("extdata", "07BF001.shp", package = "CMIP6VisR")
basin_vector <- vect(fpath)
basin_areas <- cv_clip_basin(az_raster, basin_vector)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.