correctRT: Retention time correction for ALS chromatographic profiles

Description Usage Arguments Value Author(s) See Also Examples

View source: R/correctRT.R

Description

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

Usage

1
2
3
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

A list of warped concentration profiles, mirroring the CList list element from the ALS object.

Author(s)

Ron Wehrens

See Also

ptw, correctPeaks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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

alsace documentation built on Nov. 8, 2020, 5:54 p.m.