elevation | R Documentation |
Calculates the elevation (or depth) limits (range) of a species based on either known records or predicted distribution.
elevation(spData, dem = NULL)
spData |
One of three options: 1) matrix of longitude and latitude (two columns) of each occurrence record; 2) matrix of easting and northing (two columns, e.g. UTM) of each occurrence record in meters; 3) RasterLayer object of predicted distribution (0/1 values). |
dem |
RasterLayer object. Should be a digital elevation model (DEM) of the relevant area. If not given the function will try to read it from base data, only works with longlat data. |
Maximum and minimum elevation are calculated based on the DEM.
A vector with two values (min and max) in meters above (or below) sea level.
records = red.examples("red.records")
range = red.examples("red.range")
layers = red.examples("red.layers")
dem = layers[[3]]
elevation(records, dem)
elevation(range, dem)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.