Skip to contents

Check commodity_code parameter

Usage

check_cmdCode(commodity_code)

Arguments

commodity_code

A character string or vector specifying the HS codes.

Value

A character vector specifying the HS codes.

Examples

if (FALSE) { # interactive()
check_cmdCode("01") # returns "01"
check_cmdCode(c("01", "02")) # returns "01,02"
check_cmdCode("ABC") # throws an error because "ABC" is not a valid HS code
check_cmdCode(NULL) # throws an error because at least one HS code must be provided
}