combineFrames: Combine the cytoFrames within a cytoSet according to some...

Description Usage Arguments Value Author(s) Examples

View source: R/combineFrames.R

Description

Combine the cytoFrames within a cytoSet according to some grouping factor.

Usage

1

Arguments

x

cytoSet.

by

factor. Length must be same as that of x.

Value

cytoSet.

Author(s)

Wolfgang Huber <huber@ebi.ac.uk>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cset <- readCytoSet(path=system.file("extdata", package="prada"),
                 pattern="[A-Z][0-9][0-9]$")
nr1 <- csApply(cset, nrow)
sm1 <- csApply(cset, sum)

fac <- factor(c(1,1,2,2,2,2))
cc  <- combineFrames(cset, fac)
nr2 <- csApply(cc, nrow)
sm2 <- csApply(cc, sum)

stopifnot(all(nr2==tapply(nr1, fac, sum)))
stopifnot(all(sm2==tapply(sm1, fac, sum)))

prada documentation built on April 28, 2020, 7:52 p.m.