Skip to contents

This function checks that the given partner code is valid. If the code is not valid, the function throws an error message indicating which codes are invalid. It also converts the input to a proper format if necessary.

Usage

check_partnerCode(partner)

Arguments

partner

A character vector or string of comma-separated codes that represent the trade partners in the trade data. The default value is NULL.

Value

A character vector of valid partner IDs.

Examples

if (FALSE) { # interactive()
check_partnerCode("CAN")
check_partnerCode(c("CAN", "MEX"))
check_partnerCode("all")
}