sorts and groups data per the variable controls table

add_groups_and_sort(data_to_use = data1, vc = var_controls)

Arguments

data_to_use

defaults to data1; a tibble or tidytable suitable for MMM and matching the variables listed in vc (the variable congtrol table)

vc

defaults to var_controls; a tibble with varname, role, role2, describing the roles variables will play in the MMM

Value

a tibble