Learn R Programming

redlistr (version 1.0.4)

getAreaEOO: Calculates area of the created EOO polygon.

Description

getAreaEOO calculates the area of the EOO polygon generated from makeEOO the provided data

Usage

getAreaEOO(EOO.polygon, unit = "km")

Value

The area of the EOO.polygon in km2

Arguments

EOO.polygon

An object of class SpatVect, usually the output from makeEOO.

unit

Character. Output unit of area. One of "m", "km", or "ha"

Author

Nicholas Murray murr.nick@gmail.com, Calvin Lee calvinkflee@gmail.com

See Also

Other EOO functions: makeEOO()

Examples

Run this code
library(terra)
crs.UTM55S <- '+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs'
r1 <- rast(ifelse((volcano<130), NA, 1), crs = crs.UTM55S)
ext(r1) <- c(0, 6100, 0, 8700)
EOO.polygon <- makeEOO(r1)
EOO.area <- getAreaEOO(EOO.polygon)

Run the code above in your browser using DataLab