Convert a value to its historical equivalent using a GDP deflator
Source:R/historical_real.R
historical_real.RdTakes a monetary amount from a recent year and returns what it would have
been worth in a specified historical year, using GDP deflator data sourced
from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS).
This is the inverse of adjust_real.
Arguments
- amount
Numeric (scalar or vector). The monetary amount(s) in the reference year.
- to_year
Integer. The historical year to convert back to.
- currency
Character. Currency code (
"GBP","AUD","USD","EUR","CAD","JPY","CNY","CHF","NZD","INR","KRW","BRL","NOK") or country name ("Australia","United States", etc.) — case-insensitive.- from_year
Integer. The year the amount is from. Defaults to the latest year available in the deflator series.
- round
Integer or
NULL. Number of decimal places to round to (default 2). UseNULLfor full precision.
Details
For converting consumer or personal values, use
historical_value which uses CPI instead.
See also
Other GDP deflator adjustment:
adjust_real()