ct_get_ref_table {comtradr}R Documentation

Get reference table from package data

Description

The first time, the function will read from disk, the second time from the environment. In the case of a necessary update the new data will be saved to the environment for the current session. You can use this table to look at the reference tables and if necessary extract respective classification codes by hand. In general we would recommend the function ct_commodity_lookup for this purpose. It uses the present function in the backend.

Usage

ct_get_ref_table(dataset_id, update = FALSE, verbose = FALSE)

Arguments

dataset_id

The dataset ID, which is either partner, reporter or a valid classification scheme.

update

If TRUE, downloads possibly updated reference tables from the UN. Default: FALSE.

verbose

If TRUE, sends status updates to the console. If FALSE, runs functions quietly. Default: FALSE.

Details

The function allows you to query most possible input parameters that are listed by the Comtrade API. The following dataset_ids are permitted:

Value

a tidy dataset with a reference table

Examples


## get HS commodity table
ct_get_ref_table("HS")

## get reporter table
ct_get_ref_table("reporter")


[Package comtradr version 1.0.1 Index]