get_average_df: Produces averaged data frame that can then be passed for...

View source: R/utils_average_trend.R

get_average_dfR Documentation

Produces averaged data frame that can then be passed for modelling.

Description

Produces averaged data frame that can then be passed for modelling.

Usage

get_average_df(df, cols, average_cols, weight_col = NULL)

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.

Value

Data frame of cols averaged across average_cols


caldwellst/augury documentation built on Oct. 10, 2024, 8:20 a.m.