deflate: Deflate the values in a series by the given deflator

Description Usage Arguments Value

View source: R/deflators.R

Description

Deflates the values in a series by the given deflator. The data series and the deflator should be numeric vectors of equal length. The deflator cannot contain NA or zero values.

Usage

1
deflate(data, deflator, basepos = length(data))

Arguments

data

The data series to be deflated as a numeric vector

deflator

The deflator series as numeric vector. The deflator series must be the same length as the data series and must not contain either NAs or zeros.

basepos

The vector index of the baseline for the deflated series: this equivalent to the period in which all prices will be expressed. The default value is the index of the last value in the series, which is assumed to be the most recent period.

Value

The deflated data series as a numeric vector.


olihawkins/cltools documentation built on Sept. 14, 2020, 7:25 a.m.