| sampleFilter-class | R Documentation |
This non-parameter filter selects a number of events from the primary
flowFrame.
sampleFilter(size, filterId="defaultSampleFilter")
filterId |
An optional parameter that sets the |
size |
The number of events to select. |
Selects a number of events without replacement from a flowFrame.
Returns a sampleFilter object for use in filtering
flowFrames or other flow cytometry objects.
sizeObject of class "numeric". Then number of
events that are to be selected.
filterIdA character vector that identifies this
filter.
Class "concreteFilter", directly.
Class "filter", by class concreteFilter,
distance 2.
Objects can be created by calls of the form new("sampleFilter",
...) or using the constructor sampleFilter. The latter is the
recommended way.
signature(x = "flowFrame", table =
"sampleFilter"): The workhorse used to evaluate the gate on
data. This is usually not called directly by the user, but
internally by calls to the filter methods.
signature(object = "sampleFilter"): Print
information about the gate.
B. Ellis, F.Hahne
flowFrame, filter for evaluation of
sampleFilters and split and Subsetfor
splitting and subsetting of flow cytometry data sets based on that.
## Loading example data
dat <- read.FCS(system.file("extdata","0877408774.B08",
package="flowCore"))
#Create the filter
sf <- sampleFilter(filterId="mySampleFilter", size=500)
sf
## Filtering using sampleFilters
fres <- filter(dat, sf)
fres
summary(fres)
## The result of sample filtering is a logical subset
Subset(dat, fres)
## We can also split, in which case we get those events in and those
## not in the gate as separate populations
split(dat, fres)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.