Check whether an ISO country code is valid.

check_cc(country)

Arguments

country

A character vector of ISO country codes.

Value

A logical vector flagging which elements are valid codes.

Examples

check_cc(c("AU", "US", "CN", "WRONG", NA))
#> [1]  TRUE  TRUE  TRUE FALSE FALSE