Description Usage Arguments Value Examples
View source: R/aggregateBySample.R
Using the phenoData information in the MRexperiment, calling aggregateBySample on a MRexperiment and a particular phenoData column (i.e. 'diet') will aggregate counts using the aggfun function (default rowMeans). Possible aggfun alternatives include rowMeans and rowMedians.
1 2 3 | aggregateBySample(obj, fct, aggfun = rowMeans, out = "MRexperiment")
aggSamp(obj, fct, aggfun = rowMeans, out = "MRexperiment")
|
obj |
A MRexperiment object or count matrix. |
fct |
phenoData column name from the MRexperiment object or if count matrix object a vector of labels. |
aggfun |
Aggregation function. |
out |
Either 'MRexperiment' or 'matrix' |
An aggregated count matrix or MRexperiment object where the new pData is a vector of 'fct' levels.
1 2 3 4 5 | data(mouseData)
aggregateBySample(mouseData[1:100,],fct="diet",aggfun=rowSums)
# not run
# aggregateBySample(mouseData,fct="diet",aggfun=matrixStats::rowMedians)
# aggSamp(mouseData,fct='diet',aggfun=rowMaxs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.