Learn R Programming

grattan (version 1.5.2.5)

cpi_inflator_quarters: CPI inflator when dates are nice

Description

CPI inflator when dates are nice

Usage

cpi_inflator_quarters(from_nominal_price, from_qtr, to_qtr,
  adjustment = "seasonal", useABSConnection = FALSE)

Arguments

from_nominal_price

(numeric) the nominal prices to be converted to a real price

from_qtr

(date in quarters) the dates contemporaneous to the prices in from_nominal_price. Must be of the form "YYYY-Qq" e.g. "1066-Q2". Q1 = Mar, Q2 = Jun, Q3 = Sep, Q4 = Dec.

to_qtr

(date in quarters) the date to be inflated to, where nominal price = real price. Must be of the form "YYYY-Qq" e.g. "1066-Q2".

adjustment

Should there be an adjustment made to the index? Adjustments include 'none' (no adjustment), 'seasonal', or 'trimmed mean'. By default, seasonal.

useABSConnection

Should the function connect with ABS.Stat via an SDMX connection? By default set to FALSE in which case 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.

Value

A vector of real prices.