countrycoord_data {WorldMapR}R Documentation

countrycoord_data

Description

This function generates a data frame with information about the coordinates of the central point for each country of interest. You can choose whether to keep all the countries or only a subset.

Usage

countrycoord_data(
  countries.list = NULL,
  crs = 4326,
  UK_as_GB = TRUE,
  exclude.iso.na = TRUE
)

Arguments

countries.list

List of the ISO 3166-1 alpha-2 codes of countries that are to be included. By default it is set to NULL and all countries are included.

crs

Coordinate reference system (EPSG). By default the value is 4326, which corresponds to EPSG::4326 (WGS84)

UK_as_GB

Which do you prefer between UK and GB as the code for the United Kingdom? If FALSE, GB is returned in the output data.frame. If TRUE (default), UK is returned.

exclude.iso.na

if TRUE (default), countries that do not have a ISO 3166 code are excluded from the table.

Value

an object of class data.frame

Examples

countrycoord_data(countries.list = c("IT", "FR", "SE"), crs = 3035)
countrycoord_data(countries.list = c("IT", "FR", "SE"), crs = 3035)
countrycoord_data(countries.list = c("IT", "FR", "SE", "GB"), crs = 3035, UK_as_GB = TRUE)
countrycoord_data(countries.list = c("IT", "FR", "SE", "GB"), crs = 3035, UK_as_GB = FALSE)


[Package WorldMapR version 1.2.0 Index]