validate_country_code: Validate ISO two-letters country code

View source: R/utils.R

validate_country_codeR Documentation

Validate ISO two-letters country code

Description

If available uses ISOcodes::ISO_3166_1 to validate country code. Otherwise assume that the code is valid as long as it is a two-letter code or __. See rr_publisher_country() for use of country codes.

Usage

validate_country_code(country)

Arguments

country

[character(1)]
a two-letter country code or AA, ZZ or __ (special country codes for SHERPA/RoMEO)

Value

TRUE if the country code is valid, errors otherwise


ropensci/rromeo documentation built on May 31, 2022, 10:46 p.m.