get_country_from_code: Conversion from country code to country name

View source: R/other-code-translations.R

get_country_from_codeR Documentation

Conversion from country code to country name

Description

Takes a country code (defined in the Marc standards) and returns the country name.

Usage

get_country_from_code(x)

Arguments

x

A country code (defined in the Marc standards) or a vector of country codes

Details

Interestingly, although it's called 'country' in the Marc standard, cities, states, and other non-countries also have codes

Value

Returns the country (place) name. NA if cannot be matched to country in standard.

Examples


get_country_from_code("ck")
# Colombia

# tolerant of case and leading/trailing whitespace
get_country_from_code(c(" PE", "not-a-country", "nyu"))
# c("Peru", NA, "New York (State)")


libbib documentation built on Nov. 10, 2022, 6:16 p.m.