library(CAMERA)
file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
xs <- xcmsSet(c(file), method="centWave", ppm=30, peakwidth=c(5,10))
an <- xsAnnotate(xs)
an <- groupFWHM(an)
#For one group
peaklist <- getpspectra(an, 1)
#For two groups
peaklist <- getpspectra(an, c(1,2))
Run the code above in your browser using DataLab