Convert a present-day value to its historical equivalent
Source:R/historical_value.R
historical_value.RdTakes a monetary amount from a recent year and returns what it would have been worth in a specified historical year, using bundled CPI data sourced from the World Bank Development Indicators. Supports GBP, AUD, USD, EUR, CAD, JPY, CNY, CHF, NZD, INR, KRW, BRL, and NOK.
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 data.
- round
Integer or
NULL. Number of decimal places to round to (default 2). UseNULLfor full precision.
See also
Other CPI adjustment:
adjust_inflation()