countries {necountries} | R Documentation |
Countries from naturalearth
Description
Select a set of countries; talking about countries, we mean either sovereign countries, parts of countries and dependencies, each of these cathegories being on each own row. A single or a set of countries can be obtained by indicating a set of names of, either countries, regions or subregions
Usage
countries(
name = NA,
part = FALSE,
dependency = FALSE,
indeterminate = FALSE,
exclude = NULL,
include = NULL,
utm = FALSE,
crs = NULL,
towns = FALSE,
capital = FALSE,
lang = NULL,
extend = 1,
shift = FALSE,
coastlines = TRUE
)
Arguments
name |
a character vector that contains one or several countries, regions or subregions (mixing the two of the three cathegories will result as an error), |
part |
should the parts of the countries be included (eg Azsores for Portugal or Alaska for the United States of America), |
dependency |
should the dependencies of the countries be included (eg Greenland and the Faroe Islands for Denmark), |
indeterminate |
should the indeterminate territories be included, |
exclude |
an optional set of countries that should be excluded from the request, |
include |
an optional set of countries that should be included |
utm |
if |
crs |
a CRS |
towns |
if |
capital |
if |
lang |
the language for countries and towns, one of |
extend |
a number >= 1, extend the bounding box so that the background is larger than the initial bounding box and can be transformed correctly if utm transformation is required |
shift |
a boolean, if |
coastlines |
a boolean, |
Value
an object of class countries
which inherits from sf
with the following columns:
-
id
the two letters identifier of the country, -
type
either"main"
(the main part of a sovereign country, the whole country for most of them) -country
the name of the entity, -
sovereign
the sovereign country the entity belongs to, -
capital
the name of the capital of the country (NA for parts and dependencies) -subregion
the name of the subregion (United Nations' definition) -
pop
the population of the entity, -
gdp
currently undocumented -
wbreg
the name of the region (World Bank's definition) -
region
the name of the region (United Nations' definition) Two attributes"type"
and"towns"
Examples
countries("Western Europe")