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.
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.
Examples
if (FALSE) { # interactive()
check_partnerCode("CAN")
check_partnerCode(c("CAN", "MEX"))
check_partnerCode("all")
}