ots_commodity_code {tradestatistics} | R Documentation |
String matching of official commodity/section names and Harmonized System (HS) codes according to the United Nations nomenclature
Description
Takes a text string and searches within the package data for all matching commodity codes in the context of valid API commodity codes.
Usage
ots_commodity_code(commodity = NULL, section = NULL)
Arguments
commodity |
A text string such as "Animals", "COPPER" or "fruits". |
section |
A text string such as "meat", "FISH" or "Dairy". |
Value
A tibble with all possible matches (no uppercase distinction) showing the commodity name and commodity code
Examples
ots_commodity_code(commodity = "ANIMALS ")
ots_commodity_code(section = " fish")
ots_commodity_code(commodity = "Milk", section = "Dairy")
[Package tradestatistics version 4.5.0 Index]