Learn R Programming

redlistr (version 2.1.0)

getArea: Calculates the Area of ecosystems in spatial data

Description

getArea reports the area of ecosystem units provided as spatial data

Usage

getArea(x, names_from = NA, ...)

Value

A data frame containing ecosystem identifiers and the total area of the ecosystem units in x as a units vector (km^2). For raster bricks it also contains the layer number.

Arguments

x

A SpatRaster, SpatVector, or an sf object with POLYGONS geometry.

names_from

a column names containing ecosystem labels, as a string or dplyr-style column name. Only required for SpatVector and sf types. Units are assumed to be delineated by raster value for SpatRasters.

...

Addition arguments based on input format

Author

Nicholas Murray murr.nick@gmail.com, Calvin Lee calvinkflee@gmail.com, Aniko B. Toth anikobtoth@gmail.com

See Also

Other Change functions: declineForecast(), getAreaChange(), getAreaTrend(), getDeclineStats()