standardize_countries: Convert Country Names to ISO Format

Description Usage Arguments Value Examples

View source: R/standardize_countries.R

Description

Converts a character string of country names into ISO 3166-1 Format.
Available formats are:
- Alpha 2: Two Letter Country Code (iso2)
- Alpha 3: Three Leter Country Code (iso3)
- Common Name

Usage

1
2
standardize_countries(country, to = c("iso3", "iso2", "iso_name",
  "continent_code"), missing = c("keep", "remove"))

Arguments

country

A character string with country names

to

one of c("iso3", "iso2", "iso_name")

missing

Value

A character String

Examples

1
2
countries <- c("DE", "Germany", "UK", "GB", "Singapore")
standardize_countries(countries, miss = "remove")

MatthiasUckert/Rcountry documentation built on Nov. 10, 2019, 4:43 p.m.