ratioOverlap: Calculate the proportion of a range area that is either 1:...

View source: R/ratioOverlap.R

ratioOverlapR Documentation

Calculate the proportion of a range area that is either 1: contained by landcover categories, or 2: correlated with a continuous environmental layer.

Description

Calculate the proportion of the species' range (e.g., a thresholded SDM) that is contained by landcover categories taken from a shapefile. Example shapefile categories include protected areas, threatened areas. ratioOverlap returns an s4 object containing the masked raster layer and the percent of the total range that lies within the shapefile polygons specified.

Usage

ratioOverlap(r, shp = NULL, rasMask = NULL, field, category)

Arguments

r

either raster or shapefile object representing a binary range.

shp

(optional) either 1) a shapefile of land cover features or 2) a continuousnraster. Must be in same projection as r parameter. If shp is a raster, then the number of cells within each quantile are calculated.

rasMask

(optional) a raster layer to calculate the Pearson correlation with the object r. Only if r or shp is a raster layer

field

The shapefile field attribute containing the features to compare (i.e., the column name).

category

a list of the names of shapefile features to compare. If all features are to be used, input "All".

proj

character string proj4string of crs of landcover layer.


andrepazv/changeRangeR documentation built on May 7, 2022, 3:38 p.m.