Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sampleIndicator

Sample Indicator


Description

This function can divide Essential Biodiversity Variables into fixed-size grids and calculate biodiversity indicators in the grids. To compute indicators avoiding the grid sampling procedure see gaugeIndicator

Usage

sampleIndicator(roi = NULL, 
    ..., ind = "condent", 
    min = 1, max = 100, 
    classes = 5, side, 
    perc. = 15, mc.cores = round(detectCores() * 
        0.6, 0))

Arguments

roi

Raster*; or SpatialPolygonsDataFrame; or character; or NULL. Raster object such as these produced by rsp2ebv and deforest; or region of interest (roi). The roi can be whether 1) a polygon geometry; or 2) the name of a GADM unit (see getGADM); or 3) a NULL value. Default NULL makes the function to print a list of GADM units.

...

If roi is not a Raster* then additional arguments in rsp2ebv can be specified here.

ind

character. Indicator. This can be cohesion ('cohesion'), conditional entropy ('condent'), perimeter-area fractal dimension ('condent'), among other, see package landscapemetrics. Default computes conditional entropy 'condent'.

min

numeric. Minimum cell value in the layers. This value is used to subset the data before it is reclassified, see argument 'classes' below. Default 1

max

numeric. Maximum cell value in the layers. This value is used to subset the data before it is reclassified, see argument 'classes' below. Default 100

classes

numeric; or NULL. Number of classes between 1-30 used to reclassify the layers. Default 5. If NULL then the layers are not reclassified.

side

numeric. The side of the sampling grid (m). If this is not specified, the function tries to find the maximum side length that allows splitting the layer extents into n suitable grids.

perc.

numeric. Minimum percentage of features per grid. Grids with lower percentages than this value are set to NA.

mc.cores

numeric. The number of cores. Default uses 60 percent of the cores.

Value

Raster*.

Author(s)

Wilson Lara Henao <wilarhen@temple.edu> [aut, cre], Victor Gutierrez-Velez [aut]

References

Hesselbarth, M. H., Sciaini, M., With, K. A., Wiegand, K., & Nowosad, J. (2019). landscapemetrics: an open source R tool to calculate landscape metrics. Ecography, 42(10), 1648-1657.

O'Connor, B., Secades, C., Penner, J., Sonnenschein, R., Skidmore, A., Burgess, N. D., & Hutton, J. M. (2015). Earth observation as a tool for tracking progress towards the Aichi Biodiversity Targets. Remote sensing in ecology and conservation, 1(1), 19-28.

Skidmore, A. K., & Pettorelli, N. (2015). Agree on biodiversity metrics to track from space: Ecologists and space agencies must forge a global monitoring strategy. Nature, 523(7561), 403-406.

Examples

## Warnings from GDAL/PROJ are suppressed.

## Brick with structural Essential Biodiversity Variables covering the
## extent of a location in the northern Amazon basin (Colombia):

path. <- system.file('amazon.grd',package = 'ecochange')
amazon <- suppressWarnings(brick(path.))

## Tree-cover layers in the 'amazon' brick are both formatted and
## deforested:

suppressWarnings(
    def <- deforest(amazon, names(amazon)[grepl('TC', names(amazon))],
                    ebv.vals = 0:100,
                    remnant.areas = TRUE, keep.ebv = TRUE, mc.cores = 2)
)

## Conditional entropy is sampled along the deforested layers using
## cell sides of 300m:
suppressWarnings(
condent <- sampleIndicator(def, side = 300, mc.cores = 2)
)
suppressWarnings(
    plotebv(condent)
    )

ecochange

Integrating Ecological Remote Sensing Data to Derive EBV Metrics

v1.3
GPL-3
Authors
Wilson Lara Henao [aut, cre], Victor Gutierrez-Velez [aut]
Initial release
2020-10-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.