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 indf
to use.assignments
: a named list with values in the formold_level = new_level
. See theCELL_GROUPINGS
parameter in02_norm_clustering.yaml
or02_int_clustering.yaml
config.
- do_cbind
A logical scalar: if
TRUE
, bind column-wisedf
and dataframe with new cell groupings.