Learn R Programming

alsace (version 1.8.0)

correctRT: Retention time correction for ALS chromatographic profiles

Description

Correction of retention time differences of ALS concentration profiles using parametric time warping.

Usage

correctRT(CList, reference, what = c("corrected.values", "models"), init.coef = c(0, 1, 0), ...)

Arguments

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 ptw function. The only argument that cannot be changed is warp.type: this is always equal to "global".

Value

CList list element from the ALS object.

See Also

ptw, correctPeaks

Examples

Run this code
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

Run the code above in your browser using DataLab