tradestatistics (version 0.2)

ots_country_code: String matching of official country names and ISO-3 codes according to the United Nations nomenclature

Description

This function takes a text string and searches within the package data for a country code in the context of valid API country codes.

Usage

ots_country_code(countryname = NULL)

Arguments

countryname

A text string such as "Chile", "CHILE" or "CHL".

Value

A single character if there is a exact match (e.g. ots_country_code("Chile")) or a tibble in case of multiple matches (e.g. ots_country_code("Germany"))

Examples

Run this code
# NOT RUN {
ots_country_code("Chile ")
ots_country_code("america")
ots_country_code("UNITED  STATES")
ots_country_code(" united_")
# }

Run the code above in your browser using DataCamp Workspace