gaschrom: 16 calibration GC traces

Description Usage Source References Examples

Description

The object gaschrom contains 16 calibration GC traces, measured at 5,000 time points. A peak-picked version is available as object gaschrom.st (see example).

Usage

1

Source

Claire Boucon, Unilever

References

Eilers, P.H.C. (2004) "Parametric Time Warping", Analytical Chemistry, 76 (2), 404 – 411.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
data(gaschrom)

## the gaschrom.st object has been generated in the following way:
## Not run: 
pick.peaks <- function(x, span) {
  span.width <- span * 2 + 1
  loc.max <- span.width + 1 -
      apply(embed(x, span.width), 1, which.max)
  loc.max[loc.max == 1 | loc.max == span.width] <- NA
  
  pks <- loc.max + 0:(length(loc.max)-1)
  pks <- pks[!is.na(pks)]
  pks.tab <- table(pks)
  
  pks.id <- as.numeric(names(pks.tab)[pks.tab > span])
  
  cbind(rt = pks.id, I = x[pks.id])
}

gaschrom <- t(apply(gaschrom, 1, baseline.corr))
gaschrom.st <- lapply(1:nrow(gaschrom), 
                      function(ii) 
                      pick.peaks(gaschrom[ii,], span = 11))
## remove peaks with an intensity below 10
gaschrom.st <- lapply(gaschrom.st,
                      function(pk)
                      pk[pk[,2] >= 10,])

## End(Not run)
plot(gaschrom[1,], type = "l", xlim = c(3000, 3500), ylim = c(0, 200))
abline(h = 10, lty = 2, col = 2)
abline(v = gaschrom.st[[1]], col = 4)

Example output



ptw documentation built on Jan. 19, 2022, 5:07 p.m.