add_grouping {dynwrap} | R Documentation |
Add a cell grouping to a dataset
Description
Add a cell grouping to a dataset
Usage
add_grouping(dataset, grouping, group_ids = NULL, ...)
is_wrapper_with_grouping(dataset)
get_grouping(dataset, grouping = NULL)
Arguments
dataset |
A dataset created by |
grouping |
A grouping of the cells, can be a named vector or a dataframe with group_id and cell_id |
group_ids |
All group identifiers, optional |
... |
Extra information to be stored in the dataset |
Value
A dynwrap object with the grouping added.
Examples
dataset <- example_dataset
grouping <- sample(c("A", "B", "C"), length(dataset$cell_ids), replace = TRUE)
names(grouping) <- dataset$cell_ids
dataset <- add_grouping(dataset, grouping)
head(dataset$grouping)
[Package dynwrap version 1.2.4 Index]