fsApply: Apply a Function over values in a flowSet

Description Usage Arguments Author(s) See Also Examples

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 then be reconstructed as either a flowSet, a list, or a matrix depending on options and the type of objects returned.

Usage

1
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

...

optional arguments to FUN.

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.

Author(s)

B. Ellis

See Also

apply, sapply

Examples

1
2
3
4
5
6
7
8
9
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)

flowCore documentation built on Nov. 8, 2020, 5:19 p.m.