Learn R Programming

speciesgeocodeR (version 1.0-4)

RangeRichness: Species Richness Raster from Range Polygons

Description

Calculate species richness for the specified grid based on an list of range polygons, as derived from CalcRange.

Usage

RangeRichness(ra, limits = c(-180, 180, -90, 90), reso = 60)

Arguments

ra
A list of SpatialPolygons with species ranges.
limits
numeric. A vector with the limits of the grid in decimal degrees of the format c(xmin, xmax, ymin, ymax). Default is worldwide c(-180, 180, -90, 90).
reso
numeric. resolution of the grid in minutes.

Value

a raster object.

Examples

Run this code
data(lemurs)
rang <- CalcRange(lemurs, value = "shape")
sprich <- RangeRichness(rang)
MapGrid(sprich)

Run the code above in your browser using DataLab