countries: Countries of occurrence.

Description Usage Arguments Details Value Examples

View source: R/red.R

Description

Extracts the names or ISO codes of countries of occurrence of a species based on either records or predicted distribution.

Usage

1
countries(spData, zone = NULL, ISO = FALSE)

Arguments

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).

Details

Country boundaries and designations are based on data(worldborders) from package maptools.

Value

A vector with country names or codes.

Examples

1
2
3
4

cardosopmb/red documentation built on May 13, 2020, 2:04 p.m.