country_code: country_code

View source: R/country.R

country_codeR Documentation

country_code

Description

country_code

Usage

country_code(origin, input, output)

Arguments

origin

A vector that contains codes or country names

input

Coding type of origin (Enclose in quotes "")

output

Coding type returned from origin (Enclose in quotes "")

Note

As with the package countrycode the following types are supported: Correlates of War character, CoW-numeric, ISO3-character, ISO3-numeric, ISO2-character, IMF numeric, International Olympic Committee, FIPS 10-4, FAO numeric, United Nations numeric, World Bank character, standardized country names converted by function country_name.

The following strings are available respective to the types supported y or z: "cowc", "cown", "iso3c", "iso3n", "iso2c", "imf", "fips104", "fao", "ioc", "un", "wb", "country".

Examples

country_code("Canada", "country", "cown") #returns 20
country_code("Canada", "country", "cowc") #returns "CAN"

dsself/standardizecountries documentation built on March 14, 2023, 12:22 a.m.