fsApply {flowCore}R Documentation

Apply a Function over values in a flowSet

Description

fsApply like many of the apply-style functions in R acts as an iterator for flowSet objects, allowing the application of a function to either the flowFrame or the data matrix itself. The output can the be reconstructed as either a flowSet, a list or a matrix depending on options and the type of objects returned.

Usage

    fsApply(x, FUN, ..., simplify=TRUE, use.exprs=FALSE)

Arguments

x flowSet to be used
FUN the function to be applied to each element of x
simplify logical (default: TRUE); if all true and all objects are flowFrame objects, a flowSet object will be constructed. If all of the values are of the same type there will be an attempt to construct a vector or matrix of the appropriate type (e.g. all numeric results will return a matrix).
use.exprs logical (default: FALSE); should the FUN be applied on the flowFrame object or the expression values.
... optional arguments to FUN.

Author(s)

B. Ellis

See Also

apply, sapply

Examples

fcs.loc <- system.file("extdata",package="flowCore")
file.location <- paste(fcs.loc, dir(fcs.loc), sep="/")
samp <- read.flowSet(file.location[1:3]) 

#Get summary information about each sample.
fsApply(samp,summary)

#Obtain the median of each parameter in each frame.
fsApply(samp,each_col,median)


[Package flowCore version 1.0.2 Index]