R/correctPeaks.R

Defines functions correctPeaks

Documented in correctPeaks

correctPeaks <- function(peakList, modList) {
  mapply(function(samp, mod) {
    lapply(samp,
           function(profile) {
             if (nrow(profile) > 0) {
               cbind(profile,
                     rt.cor = c(predict(mod, profile[,1], what = "time")))
             } else {
               cbind(profile, rt.cor = rep(0, 0))
             }
           })},
         peakList, modList, SIMPLIFY = FALSE)
}

Try the alsace package in your browser

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

alsace documentation built on Nov. 17, 2017, 12:59 p.m.