Skip to contents

This is basically a recoding of levels. A new column (cell group) will be based on levels in the existing column.

Usage

make_cell_groupings(df, cell_groupings, do_cbind = FALSE)

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 in df to use.

  • assignments: a named list with values in the form old_level = new_level. See the CELL_GROUPINGS parameter in 02_norm_clustering.yaml or 02_int_clustering.yaml config.

do_cbind

A logical scalar: if TRUE, bind column-wise df and dataframe with new cell groupings.

Value

A dataframe.