ratioOverlap | R Documentation |
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.
ratioOverlap(r, shp = NULL, rasMask = NULL, field, category)
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.