ots_inflation_adjustment: Expresses tidy data from the API in dollars of a reference...

Description Usage Arguments Examples

View source: R/ots_inflation_adjustment.R

Description

Uses inflation records from The World Bank to convert trade records and express them in dollars of the same year.

Usage

1
ots_inflation_adjustment(trade_data = NULL, reference_year = NULL)

Arguments

trade_data

A tibble obtained by using ots_create_tidy_data. Default set to NULL.

reference_year

Year contained within the years specified in api.tradestatistics.io/year_range (e.g. 2010). Default set to NULL.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# The next example can take more than 5 seconds to compute,
# so this is shown without evaluation according to CRAN rules

# Convert dollars of 1980 to dollars of 2010
d <- ots_create_tidy_data(years = 1980, reporters = "chl", partners = "chn")
ots_inflation_adjustment(trade_data = d, reference_year = 2010)

## End(Not run)

tradestatistics documentation built on Sept. 18, 2020, 9:09 a.m.