Inflate {grattanInflators}R Documentation

Generic inflator

Description

Generic inflator

Usage

Inflate(
  from,
  to,
  index,
  x = NULL,
  fy_month = 3L,
  check = 2L,
  nThread = getOption("grattanInflators.nThread", 1L)
)

Arguments

from, to

Times for which the inflator is desired. If NULL, a date range close to the previous year is used.

index

A table of at least two columns, named date and value. date is the column of times to which from, to will be matched. value is the values that determine the inflation factor.

x

(Advanced) A vector that will be inflated in-place. If NULL, the default, the return vector is simply the inflation factor for 'from'.

fy_month

An integer 1-12, the month to be used for years and financial years in from or to. For financial years, the month is the month of the financial year, so for example fy_month = 9 and "2015-16" means Sep-2015, while fy_month = 6 means Jun-2016.

check

integer(1) If 0L, no checks are performed, and clearly invalid inputs result in NA in the output. If check = 1L an error is performed for bad input; check = 2L is more thorough.

nThread

Number of threads to use.

Value

If 'x' is 'NULL', the default, a numeric vector matching the lengths of 'from' and 'to' equal to the ratio between the corresponding values in the column value.

If 'x' is numeric, those values are multiplied by the inflators, in-place.


[Package grattanInflators version 0.5.3 Index]