Description Usage Arguments Value Examples
Return mass/charge ration, intensity for the given peak
1 | lapply(Sample1@MassSpectrum, AverageScan)
|
x |
All Mass Spectrum |
Return a list of average mass/charge ration and relative intensity for e very scan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x)
{
y <- data.frame(x$b)
colnames(y) <- c("mass", "absolute", "relative")
aveMZ <- mean(as.numeric(as.character(y$mass)))
aveAbs <- mean(as.numeric(as.character(y$absolute)))
aveRel <- mean(as.numeric(as.character(y$relative)))
averageSpectrum <- data.frame(MZ = aveMZ, Absolute = aveAbs,
Relative = aveRel)
return(averageSpectrum)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.