Skip to contents

Check flow_direction parameter

Usage

check_flowCode(flow_direction)

Arguments

flow_direction

A character string or vector specifying the type of trade flow. Must be one or more of "import", "export", "re-export", "re-import", or "all".

Value

A character vector specifying the trade flow codes.

Examples

if (FALSE) { # interactive()
check_flowCode("import") # returns "M"
check_flowCode(c("export", "re-export")) # returns "X,RX"
check_flowCode("trade") # throws an error because "trade" is not a valid flow code
check_flowCode(NULL) # throws an error because at least one flow code must be provided
}