rromeo (version 0.1.1)

validate_country_code: Validate ISO two-letters country code

Description

If available uses ISOcodes::ISO_3166 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