getAllPeaks: Extract all peaks from the chromatographic profiles of an ALS...

Description Usage Arguments Value Author(s) Examples

View source: R/getAllPeaks.R

Description

Extractor function to find all peaks in the chromatographic profiles of an ALS object. Peaks are located as local maxima within the given span (function findpeaks) and at the given positions a gaussian curve is fit (function fitpeaks).

Usage

1
getAllPeaks(CList, span = NULL, eps = 1e-01)

Arguments

CList

A list of profile matrices, each of the same dimensions (timepoints times components).

span

The span used for identifying local maxima in the individual components. If not given, the default of findpeaks is used.

eps

Minimal value for the peak width, basically used to eliminate peaks with zero width.

Value

The result is a list, with each element corresponding to one data file, and containing data for the fitted peaks for each of the ALS components. Note that this function presents the "rt", "sd" and "FWHM" fields in real time units.

Author(s)

Ron Wehrens

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(teaMerged)
pks <- getAllPeaks(teaMerged$CList, span = 11)
## show component 2 from the second file
par(mfrow = c(2,1))
plot(teaMerged, what = "profiles", showWindows = FALSE,
     mat.idx = 2, comp.idx = 2)
## and show where the peaks are picked
abline(v = pks[[2]][[2]][,"rt"], col = "gray")

## same for component 6
plot(teaMerged, what = "profiles", showWindows = FALSE,
     mat.idx = 2, comp.idx = 6, col = "red")
abline(v = pks[[2]][[6]][,"rt"], col = "pink")

rwehrens/alsace documentation built on May 28, 2019, 10:42 a.m.