ots_commodity_code: String matching of official commodity/section names and...

View source: R/ots_strings_processing.R

ots_commodity_codeR 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")

tradestatistics/tradestatistics documentation built on July 8, 2023, 12:26 a.m.