inst/unitTests/test_psDist.R

test.psDist <- function() {
 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)
 checkEqualsNumeric(CAMERA:::psDist(an,an,PSpec1=10,PSpec2=10, method="cosine", nPmin=1),0.75)
 checkEqualsNumeric(CAMERA:::psDist(an,an,PSpec1=10,PSpec2=10, method="meanMZmatch"),1)
 }

Try the CAMERA package in your browser

Any scripts or data that you put into this service are public.

CAMERA documentation built on Nov. 8, 2020, 4:59 p.m.