combineFrames {prada} | R Documentation

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

### Description

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

### Usage

    combineFrames(x, by)

### Arguments

`x` | cytoSet.
`by` | factor. Length must be same as that of `x`.

### Details

### Value

cytoSet.

### Author(s)

Wolfgang Huber <huber@ebi.ac.uk>

### See Also

### Examples

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

[Package prada version 1.10.1 Index]