tradestatistics (version 0.2)

ots_product_code: String matching of official product names and Harmonized System (HS) codes according to the United Nations nomenclature

Description

This function takes a text string and searches within the package data for all matching product codes in the context of valid API product codes.

Usage

ots_product_code(productname = NULL, productgroup = NULL)

Arguments

productname

A text string such as "Animals", "COPPER" or "fruits".

productgroup

A text string such as "meat", "FISH" or "Dairy".

Value

A tibble with all possible matches (no uppercase distinction) showing the product name, product code and corresponding trade classification (e.g. HS92 or SITC)

Examples

Run this code
# NOT RUN {
ots_product_code(productname = "ANIMALS ")
ots_product_code(productgroup = "  fish")
ots_product_code(productname = "Milk", productgroup = "Dairy")
ots_product_code()
# }

Run the code above in your browser using DataCamp Workspace