countries | R Documentation |
Extracts the names or ISO codes of countries of occurrence of a species based on either records or predicted distribution.
countries(spData, zone = NULL, ISO = FALSE)
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). |
zone |
UTM zone if data is in metric units. |
ISO |
Outputs either country names (FALSE) or ISO codes (TRUE). |
Country boundaries and designations are based on data(worldborders) from package maptools.
A vector with country names or codes.
records = red.examples("red.records")
range = red.examples("red.range")
countries(records)
countries(range, ISO = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.