Learn R Programming

regions (version 0.1.8)

get_country_code: Get Country Code Of Regions

Description

The function identifies the sub-national geographical identifiers from known typologies and returns the ISO 3166-1 alpha-2 country codes.

Usage

get_country_code(geo, typology = "NUTS")

Arguments

geo

A character variable with geo codes.

typology

Currently the following typologies are supported: "NUTS1", "NUTS2", "NUTS3" or "NUTS" for any of the NUTS typologies. The technical typology "NUTS0" can be used to translate Eurostat country codes to ISO 3166-1 alpha-2 country codes.

Value

The ISO 3166-1 alpha-2 codes of the countries as a character vector.

See Also

Other recode functions: recode_nuts()

Examples

Run this code
# NOT RUN {
{
get_country_code (c("EL", "GR", "DED", "HU102"))
}
# }

Run the code above in your browser using DataLab