averageReplicates {ChemoSpec} | R Documentation |
Average Replicates in a Spectra Object
Description
Average the replicates in a Spectra
object and return a new Spectra object
with fewer samples. One should probably not do this until each individual sample has been
visualized for quality control, in case it is a potential outlier.
Usage
averageReplicates(spectra, uniq)
Arguments
spectra |
An object of S3 class |
uniq |
Character. A character vector containing strings representing unique sample
identifiers. The sample names will be searched for these strings, and all samples
matching a given string will be averaged and put into a new Spectra object. For
example, consider the case where samples are named
|
Value
An object of S3 class Spectra
.
Author(s)
Bryan A. Hanson (DePauw University).
Examples
data(SrE.IR)
averaged <- averageReplicates(SrE.IR, uniq = c("EPO", "OO", "adSrE", "pSrE"))
sumSpectra(SrE.IR)
sumSpectra(averaged)