View source: R/parks_calc_attributes_helpers.R
raster_class_area | R Documentation |
Helper function within parks_calc_attributes()
.
For each unique pixel value (each representing a specific raster class/category),
the total area per class is calculated.
raster_class_area(
polygons,
raster,
raster_min_patch_size = units::set_units(0, "m^2"),
relative = TRUE,
...
)
polygons |
|
raster |
|
raster_min_patch_size |
Minimum patch size to be included in results.
Provided either as a units object (see |
relative |
logical. Whether or not to calculate relative amounts
(i.e. percentage area). Defaults to |
... |
Other arguments passed to |
polygons
with added column(s) < class value >_area
, and < class value >_area_pct
if relative
is set to TRUE
.
Note that the value 0
will be summarised; convert pixels to NA
if you wish to exclude them.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.