sampleFilter-class: Class "sampleFilter"

sampleFilter-classR Documentation

Class "sampleFilter"

Description

This non-parameter filter selects a number of events from the primary flowFrame.

Usage

sampleFilter(size, filterId="defaultSampleFilter")

Arguments

filterId

An optional parameter that sets the filterId of this filter. The object can later be identified by this name.

size

The number of events to select.

Details

Selects a number of events without replacement from a flowFrame.

Value

Returns a sampleFilter object for use in filtering flowFrames or other flow cytometry objects.

Slots

size

Object of class "numeric". Then number of events that are to be selected.

filterId

A character vector that identifies this filter.

Extends

Class "concreteFilter", directly.

Class "filter", by class concreteFilter, distance 2.

Objects from the Class

Objects can be created by calls of the form new("sampleFilter", ...) or using the constructor sampleFilter. The latter is the recommended way.

Methods

%in%

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.

show

signature(object = "sampleFilter"): Print information about the gate.

Author(s)

B. Ellis, F.Hahne

See Also

flowFrame, filter for evaluation of sampleFilters and split and Subsetfor splitting and subsetting of flow cytometry data sets based on that.

Examples


## 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)



RGLab/flowCore documentation built on March 19, 2024, 9:45 p.m.