Produces averaged data frame that can then be passed for modelling.
Source:R/utils_average_trend.R
get_average_df.Rd
Produces averaged data frame that can then be passed for modelling.
Arguments
- df
Data frame of model data.
- cols
Name of numeric column(s) to take average of.
- 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.
- weight_col
Column name of column of weights to be used in averaging, such as country population.