Countries of occurrence.

Description

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

Usage

1
countr(spData, ISO = FALSE)

Arguments

spData

Either a matrix of longitude and latitude (two columns) of each occurrence record or a presence/absence map as a RasterLayer object.

ISO

Outputs either country names (FALSE) or ISO codes (TRUE).

Details

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

Value

A vector with country names or codes.

Examples

1
2
3
4