: sub-samples a flowFrame with the specified number of samples, without replacement. adds also a column 'Original_ID' if not already present in flowFrame.
subsample(ff, nEvents, seed = NULL, keepOriginalCellIDs = TRUE, ...)
a flowCore::flowFrame
number of events to be obtained using sub-sampling
can be set for reproducibility of event sub-sampling
if TRUE, adds (if not already present) a 'OriginalID' column containing the initial IDs of the cell (from 1 to nrow prior to subsampling). if FALSE, does the same, but takes as IDs (1 to nrow after subsampling)
additional parameters (currently not used)
new flowCore::flowFrame with the obtained subset of samples
data(OMIP021Samples)
# take first sample of dataset, subsample 100 events and create new flowFrame
ff <- subsample(OMIP021Samples[[1]], nEvents = 100)