Learn R Programming

comtradr (version 0.0.2)

ct_countries_table: Extract country code look up table from UN Comtrade

Description

Returns a dataframe of countries and country codes, downloaded from UN Comtrade. For use with the UN Comtrade API, full API docs can be found at https://comtrade.un.org/data/doc/api/

Usage

ct_countries_table(reporters = NULL, partners = NULL)

Arguments

reporters

Default value NULL, otherwise this should be a url as a char string that points to the reporter areas JSON dataset on the Comtrade website. Only necessary if the Comtrade site changes from https://comtrade.un.org/data/cache/reporterAreas.json

partners

Default value NULL, otherwise this should be a url as a char string that points to the reporter areas JSON dataset on the Comtrade website. Only necessary if the Comtrade site changes from https://comtrade.un.org/data/cache/partnerAreas.json

Value

A dataframe of countries and country codes, downloaded from UN Comtrade.

Examples

Run this code
# NOT RUN {
countrydf <- ct_countries_table()
# }

Run the code above in your browser using DataLab