aoo: Area of occupancy of a species as defined by the IUCN

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Area of occupancy of a species as defined by the IUCN

Usage

1
aoo(occ_pr, species)

Arguments

occ_pr

SpatialPointsDataFrame of occurrence records. Projection must be one that allows safe calculation of areas (e.g., Lambert Azimuthal Equal Area).

species

(character) scientific name of the species.

Value

A list containing a SpatialPolygonsDataFrame of the area of occupancy, and a vector with the areas in km2 of the spatial polygons resulted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# data
data("occ_p", package = "rangemap")
occ <- unique(occ_p)
WGS84 <- sp::CRS("+init=epsg:4326")
occ_sp <- sp::SpatialPointsDataFrame(coords = occ[, 2:3], data = occ,
                                     proj4string = WGS84)

LAEA <- LAEA_projection(spatial_object = occ_sp)
occ_pr <- sp::spTransform(occ_sp, LAEA)

sp <- as.character(occ[1, 1])

# AOO
aoo_pe <- aoo(occ_pr = occ_pr, species = sp)

rangemap documentation built on Sept. 5, 2021, 5:17 p.m.