loops over the variable control table to assign roles within a recipe. These roles control transformations applied and construction of model formulas

bulk_update_role(
  this_recipe,
  vars_to_append_roles = var_controls$varname,
  roles_to_be_appended = var_controls$role
)

Arguments

this_recipe

a recipe object

vars_to_append_roles

Defaults to var_controls$varname; a vector of variable names that will have updated roles

roles_to_be_appended

Defaults to var_controls$role; a vector of roles that match the vars_to_append_roles vector

Value

a recipe