Assert sort column for use in average trend functions
Source:R/utils_asserts.R
assert_group_sort_col.Rd
Takes in formula variables and average columns, as well as sort column argument.
If sort_col
is provided, an error is generated if it is not
in formula_vars
or average_cols
. If sort_col
is not provided, then
warnings are generated that no average trend can be generated.
Arguments
- formula_vars
Variables included in the model formula, generated by
all.vars(formula)
.- average_cols
Column name(s) of column(s) for use in grouping data for averaging, such as regions. If missing, uses global average of the data for infilling.
- sort_col
Column name(s) to use to
dplyr::arrange()
the data prior to supplying type and calculating mean absolute scaled error on data involving time series. IfNULL
, not used. Defaults to"year"
.