Converts an amount from a historical year into its equivalent value in a target 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 original monetary amount(s).
- from_year
Integer. The year the amount is from.
- currency
Character. A currency code or country name. Accepted codes:
"GBP","AUD","USD","EUR","CAD","JPY","CNY","CHF","NZD","INR","KRW","BRL","NOK". Country names are also accepted, e.g."Australia","United States","Japan","New Zealand","India","Norway"(case-insensitive).- to_year
Integer. The target year to adjust to. Defaults to the latest available year in the data.
- round
Integer or
NULL. Number of decimal places to round to (default 2). UseNULLfor full precision.
See also
Other CPI adjustment:
historical_value()