correctRT {alsace} | R Documentation |
Correction of retention time differences of ALS concentration profiles using parametric time warping.
correctRT(CList, reference, what = c("corrected.values", "models"), init.coef = c(0, 1, 0), ...)
CList |
List of matrices containing concentration profiles. |
reference |
Index of the sample that is to be considered the reference sample. |
what |
What to return: either the time-corrected profiles (useful for visual inspection) or the warping models (for further programmatic use). |
init.coef |
Starting values for the optimisation. |
... |
Optional arguments for the |
A list of warped concentration profiles, mirroring the
CList
list element from the ALS object.
Ron Wehrens
data(teaMerged) CList.corrected <- correctRT(teaMerged$CList, reference = 2) original.profiles <- sapply(teaMerged$CList, identity, simplify = "array") corrected.profiles <- sapply(CList.corrected, identity, simplify = "array") def.par <- par(no.readonly = TRUE) par(mfrow = c(2,4)) for (i in 1:4) matplot(dimnames(original.profiles)[[1]], original.profiles[,i,], type = "l", lty = 1, xlab = "Time (min.)", ylab = "Response", main = paste("Component", i)) for (i in 1:4) matplot(dimnames(original.profiles)[[1]], corrected.profiles[,i,], type = "l", lty = 1, xlab = "Time (min.)", ylab = "Response", main = paste("Component", i, "- warped")) par(def.par) ## reset defaults