get_country_from_code {libbib}R 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)")


[Package libbib version 1.6.4 Index]