Learn R Programming

speciesgeocodeR (version 1.0-4)

GetElevation: Elevation Data for Multiple Species

Description

A wrapper using the getData function of the raster package to get elevation information for each occurrence point in x.

Usage

GetElevation(x)

Arguments

x
an object of the class data.frame, spgeoIN, spgeoOUT or a character string.

Value

A vector of elevation values.

Details

If x is a data.frame, it must have 3 columns: species name, longitude and latitude. If x is a character string it can be the path to a tab delimited .txt file with three columns: species name, longitude and latitude. If x is a character string of species names, the function will use rgbif to download occurrence information from GBIF. In this case no data cleaning is performed, except from the ‘removeZeros’ option of rgbif.

See Also

ReadPoints, SpGeoCod.

Examples

Run this code
data(lemurs)
## Not run: 
# GetElevation(lemurs)## End(Not run)

Run the code above in your browser using DataLab