ots_country_code: String matching of official country names and ISO-3 codes...

View source: R/ots_strings_processing.R

ots_country_codeR Documentation

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

Description

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

ots_country_code("Chile ")
ots_country_code("america")
ots_country_code("UNITED  STATES")
ots_country_code(" united_")

tradestatistics documentation built on July 9, 2023, 5:33 p.m.