require(TargetSearchData)
# import refLibrary, rimLimits and sampleDescription.
data(TargetSearchData)
# get the CDF files
cdfpath <- file.path(find.package("TargetSearchData"), "gc-ms-data")
# select a subset of samples
smp <- sampleDescription[1:4]
# update the CDF path
CDFpath(smp) <- cdfpath
# make a copy of the RI markers object
rim <- rimLimits
# run RIcorrect
RImat <- RIcorrect(smp, rim, massRange = c(85,320),
Window = 15, pp.method = "ppc", IntThreshold = 50)
# extract the retention times of the markers
RImat2 <- riMatrix(smp, rim)
# both matrices should be equal
stopifnot( all.equal(RImat, RImat2, tolerance=1e-8) )
Run the code above in your browser using DataLab