powered by
Match country names to their equivalent naturalearth WKT polygons using rnaturalearth::ne_countries().
rnaturalearth::ne_countries()
match_countries(countrynames, returnmulti = TRUE, onlywkt = FALSE)
A list containing:
$location_wkt: a multipolygon containing all locations (or a named vector of individual country polygons).
$location_wkt
$missing_locs: any provided countries not found in naturalearth.
$missing_locs
$found_locs: any provided countries that were found in naturalearth.
$found_locs
a vector of country names to match to naturalearth.
return the GBIF taxon ids only (otherwise return the full lookup dataframe).
only return location_wkt (see note for more details).
Francis Windram
match_countries(c("United Kingdom", "Germany"))
Run the code above in your browser using DataLab