Learn R Programming

oec (version 2.6.7)

getdata_interval: Convenient wrapper for getdata

Description

Convenient wrapper for getdata

Usage

getdata_interval(origin, destination, initial_year, final_year, classification,
  interval, write)

Arguments

origin

ISO code for country of origin (e.g. chl for Chile). Run countries_list in case of doubt.

destination

ISO code for country of destination (e.g. chn for China). Run countries_list in case of doubt.

initial_year

The OEC's API ranges from 1962 to 2016. This needs to be lower than `final_year`.

final_year

The OEC's API ranges from 1962 to 2016. This needs to be greater than `initial_year`.

classification

Trade classification that can be 1 (HS92 4 characters since year 1995), 2 (SITC rev.2 4 characters since year 1962) or 3 (HS92 6 characters since year 1995). By default set to 1.

interval

is an optional parameter to define the distance between years (by default set to 1)

write

Write to user's filespace (by default set to FALSE)

Examples

Run this code
# NOT RUN {
# Run `countries_list` to display the full list of countries
# What does Chile export to Peru? years 2000 to 2015 - classification HS92 6 characters
getdata_interval("chl", "chn", 2000, 2015, 3)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab