Skip to contents

This function checks that the given reporter 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_reporterCode(reporter)

Arguments

reporter

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

Value

A character vector of valid reporter IDs.

Examples

if (FALSE) { # interactive()
check_reporterCode("USA")
check_reporterCode(c("USA", "FRA"))
check_reporterCode("all")
}