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 TRUE, the geometry is transformed using the relevant utm projection, if an integer, the geometry is transformed using the utm projection for the zone indicated,

crs

a CRS

towns

if TRUE, a tibble containing the cities of the countries selected is returned as a "towns" attribute,

capital

if TRUE the tibble containing the cities of the countries selected will contain the capitals, whatever their size,

lang

the language for countries and towns, one of "en", "fr", "es", '"it"

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 TRUE, st_shift_longitude is used

coastlines

a boolean, TRUE to get the background coastines

Value

an object of class countries which inherits from sf with the following columns:

Examples

countries("Western Europe")

[Package necountries version 0.1-1 Index]