View source: R/summarizeSamples.R
summarizeSamples | R Documentation |
The function takes an eSet
object and a factor of the same length as
the object, and summarizes samples of the same factor level by applying the
function.
summarizeSamples(
eset,
indSamples = eset$SAMPLEID,
removeInvarCols = TRUE,
fun = sum,
...
)
poolReplicates(eset, indSamples = eset$SAMPLEID, removeInvarCols = TRUE)
avgReplicates(eset, indSamples = eset$SAMPLEID, removeInvarCols = TRUE)
medianReplicates(eset, indSamples = eset$SAMPLEID, removeInvarCols = TRUE)
eset |
An |
indSamples |
A factor of the same length as the sample number of the object |
removeInvarCols |
Logical, whether invariant columns of the resulting
|
fun |
The function to be applied to summarize samples |
... |
Other parameters passed to the function |
poolReplicates
and avgReplicates
are two specific form of the
more generic summarizeSamples
function: they take sum and average of
replicates given by the factor, respectively.
From version 1.1-7, the function summarizes not only exprs
, but also
all other objects in assayData
A eSet
object.
Jitao David Zhang <jitao_david.zhang@roche.com>
The function calls summarizeColumns
internally.
Also see summarizeProbesets
.
data(ribios.ExpressionSet, package="ribiosExpression")
index <- factor(c(gl(12,2), 13, 14))
(ss.eset1 <- summarizeSamples(ribios.ExpressionSet, index))
(ss.eset2 <- summarizeSamples(ribios.ExpressionSet, index, fun=mean,
na.rm=TRUE))
## equivalently
(ss.eset2 <- poolReplicates(ribios.ExpressionSet, index))
(ss.eset3 <- avgReplicates(ribios.ExpressionSet, index))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.