###################################################
### chunk number 1: groupCorr
###################################################
#line 161 "E:/biocbld/bbs-2.7-bioc/tmpdir/RtmpA9mdJf/R.INSTALL27221cbb/CAMERA/inst/doc/CAMERA.Rnw"
library(CAMERA)
file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
xs   <- xcmsSet(file, method="centWave",ppm=30, peakwidth=c(5,10))
an   <- xsAnnotate(xs)
an   <- groupFWHM(an)
an  <- findIsotopes(an)
anC <- groupCorr(an, cor_eic_th = 0.75)
anCp<- groupCorr(an, cor_eic_th = 0.75, polarity="positive")
an1   <- findAdducts(anC, polarity="positive")
an2   <- findAdducts(anCp, polarity="positive")
par(mfrow=c(2,1))
plotEICs(an1, pspec=8, maxlabel=5)
plotEICs(an2, pspec=8, maxlabel=5)


###################################################
### chunk number 2: EICPspec1
###################################################
#line 359 "E:/biocbld/bbs-2.7-bioc/tmpdir/RtmpA9mdJf/R.INSTALL27221cbb/CAMERA/inst/doc/CAMERA.Rnw"
library(CAMERA)
file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
xs   <- xcmsSet(file, method="centWave",ppm=30, peakwidth=c(5,10))
an   <- xsAnnotate(xs)
an   <- groupFWHM(an)
an   <- findAdducts(an, polarity="positive")
plotEICs(an, pspec=2, maxlabel=5)


###################################################
### chunk number 3: Pspec1
###################################################
#line 379 "E:/biocbld/bbs-2.7-bioc/tmpdir/RtmpA9mdJf/R.INSTALL27221cbb/CAMERA/inst/doc/CAMERA.Rnw"
plotPsSpectrum(an, pspec=2, maxlabel=5)


