Description Usage Arguments Value
Creates real terms series from a set of columns in a dataframe using the
given row deflator series and the number of the row to use as the baseline.
The deflator series must have the same length as the number of rows in the
dataframe. If the deflator series is already in the dataframe, then pass it
into the function with data$deflator_column
. The deflator cannot
contain NA or zero values. Use add_real
to append the real terms
series to the input dataframe.
1 |
data |
A dataframe containing columns of numerical data to be expressed in real terms. |
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. |
from |
The number or name of the column from which real terms series are calculated. The default is 2, assuming one column for row labels. Use 1 if there are no preceding data columns. |
to |
The number or name of the column to which real terms series are calculated. The default is ncol(data), which means real terms series are calculated across all remaining columms in the dataframe. |
baserow |
The number of the row to be used as the baseline for calculating the real terms series. The default is the last row in the dataframe, which is assumed to be the most recent period. |
A tibble containing real terms series and any preceding columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.