Learn R Programming

grattan (version 1.5.2.5)

cpi_inflator: CPI inflator

Description

CPI inflator

Usage

cpi_inflator(from_nominal_price = 1, from_fy, to_fy = "2014-15",
  adjustment = c("seasonal", "none", "trimmed.mean"),
  useABSConnection = FALSE, allow.projection = TRUE)

Arguments

from_nominal_price

(numeric) the price (or vector of prices) to be inflated

from_fy

(character) a character vector with each element in the form "2012-13" representing the financial year contemporaneous to the from_nominal_price.

to_fy

(character) a character vector with each element in the form "2012-13" representing the financial year that prices are to be inflated.

adjustment

What CPI index to use ("none" = raw series, "seasonal", or "trimmed" [mean]).

useABSConnection

Should the function connect with ABS.Stat via an SDMX connection? If FALSE (the default), a pre-prepared index table is used. This is much faster and more reliable (in terms of errors), though of course relies on the package maintainer to keep the tables up-to-date. The internal data is up-to-date as of 2017-Q3. If using useABSConnection = TRUE, ensure you have rsdmx (>= 0.5-10) up-to-date.

allow.projection

Should projections beyond the ABS's data be allowed?

Value

The value of from_nominal_price in real (to_fy) dollars.

Examples

Run this code
# NOT RUN {
cpi_inflator(100, from_fy = "2005-06", to_fy = "2014-15")
# }

Run the code above in your browser using DataLab