This is basically a recoding of levels. A new column (cell group) will be based on levels in the existing column.
Arguments
- df
A dataframe.
- cell_groupings
A named list of named lists. Names of outer list will be used for new columns in
df. The nested lists must have the following values:source_column: a name of column indfto use.assignments: a named list with values in the formold_level = new_level. See theCELL_GROUPINGSparameter in02_norm_clustering.yamlor02_int_clustering.yamlconfig.
- do_cbind
A logical scalar: if
TRUE, bind column-wisedfand dataframe with new cell groupings.