View source: R/utils-validation.R
| match_countries | R Documentation |
Match country names to their equivalent naturalearth WKT polygons using rnaturalearth::ne_countries().
match_countries(countrynames, returnmulti = TRUE, onlywkt = FALSE)
countrynames |
a vector of country names to match to naturalearth. |
returnmulti |
return the GBIF taxon ids only (otherwise return the full lookup dataframe). |
onlywkt |
only return location_wkt (see note for more details). |
A list containing:
$location_wkt: a multipolygon containing all locations (or a named vector of individual country polygons).
$missing_locs: any provided countries not found in naturalearth.
$found_locs: any provided countries that were found in naturalearth.
Francis Windram
match_countries(c("United Kingdom", "Germany"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.