From the result of ompr::solve_model(), this function attaches the
derived groupings to the original dataframe comprising students.
assign_groups(
model_result,
assignment = c("diversity", "preference"),
dframe,
params_list,
group_names
)A data frame with the group assignments attached to the original group composition dataframe.
The output solution objection.
Character string indicating the type of model that this dataset is for. The argument is either 'preference' or 'diversity'. Partial matching is fine.
The original dataframe used in extract_student_info().
The list of parameters from the YAML file, i.e. the output
of extract_params_yaml(). This is only required for the preference-based
assignment.
A character string. It denotes the column name in the original dataframe containing the self-formed groups. Note that we need the string here, not the integer position, since we are going to join with it.