Description Usage Arguments Details Value Author(s) Examples
View source: R/divideIntoBatches.R
Divide a single input object into multiple separate objects according to their batch of origin.
1 | divideIntoBatches(x, batch, byrow = FALSE, restrict = NULL)
|
x |
A matrix-like object where one dimension corresponds to cells and another represents features. |
batch |
A factor specifying the batch to which each cell belongs. |
byrow |
A logical scalar indicating whether rows correspond to cells. |
restrict |
A subsetting vector specifying which cells should be used for correction. |
This function is intended for internal use and other package developers.
It splits a single input object into multiple batches, allowing developers to use the same code for the scenario where batch
is supplied with a single input.
A list containing:
batches
, a named list of matrix-like objects where each element corresponds to a level of batch
and contains all cells from that batch.
reorder
, an integer vector to be applied to the combined batches
to recover the ordering of cells in x
.
restricted
, a named list of integer vectors specifying which cells are to be used for correction.
Set to NULL
if the input restrict
was also NULL
.
Aaron Lun
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.