sub.samples | R Documentation |
fcs.SCE
objectIt generates reduce randomly the number of events of a fcs.SCE object (it computes this reduction for each FCS file separatelly inside this object). It can generate a new reduced fcs.SCE
object or a simple index position for removing events.
sub.samples(fcs.SCE, subsampling = 1000, index = F, unbalanced = NULL)
fcs.SCE |
A |
subsampling |
Number of events to keep (in each FCS file contained within the |
index |
Logical indicating if returning an fcs.SCE object or a index vector. Default = |
unbalanced |
If indicated, subsampling will be applied in a "unbalanced" way, i.e., only in the specified element in a given column. Its format is a vector containing the column name to reduce and the element within that column to be subsampled. It is very IMPORTANT keep in mind this subsampling is only for visualization purposes, not for downstream statistical analysis. Default = |
## Not run:
# option 1, simple subsampling
fcs_red <- sub.samples(data = fcs, subsampling = 1000)
# option 2, return the subsampling index
keep_red <- sub.samples(data = fcs, subsampling = 1000, index = T)
fcs_red <- fcs[,keep_red]
# option 3, unbalanced subsampling (in percentaje way)
fcs_red <- sub.samples(data = fcs, subsampling = 0.3, unbalanced = c("condition", "not_progressed")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.