checkRimLim: Visually check retention index marker limits

Description Usage Arguments Details Value See Also Examples

Description

A function to visually check if the retention time limites of the retention index markers (aka FAMEs) is correct.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
checkRimLim(
  samples,
  rim,
  layout,
  show = TRUE,
  extend = 0.5,
  rect.col = "#e7e7e7",
  mar = c(2, 2, 2, 2),
  oma = c(3, 3, 2, 0.5),
  cex.main = 1,
  type = "l",
  ...
)

Arguments

samples

A tsSample object created by ImportSamples.

rim

A tsRim object describing the retention index markers. See ImportFameSettings.

layout

A vector of the form c(nr, nc) to arrange the panel by nr rows and nc columns. If missing then the layout is created automatically.

show

Logical. If FALSE the plot is not shown, but the data points can be used for further inspection or for custom plots.

extend

a numeric coefficient to extend the time window search of the respective time marker. Defaults to 0.5.

rect.col

the color for the background rectangle which indicates the current retention time limits.

mar

the subplots margins, passed to par().

oma

the outer plot margins, passed to par().

cex.main

The magnification to be used for main titles, passed to par().

type

A character vector indicating the type of plots. Default "l" for lines. Passed to plot().

...

extra plotting arguments passed to plot() such as col, lty, pch, lwd.

Details

The function takes a random CDF file from your tsSample object and creates a panel plot of the m/z traces around the area in which a marker is expected to be. Repeated calls to this function can be used to check other samples. It is also possible to check a specific sample by indexing the tsSample object.

Value

A list of n times 2 matrices or invisible. Each element correspond to a marker. Columns are retention time and intensities of the respective marker's m/z. The rows can be as many data points are within the search window.

See Also

tsSample, tsRim, ImportFameSettings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
require(TargetSearchData)

# get the cdf path TargetSearchData
cdfpath <- file.path(find.package("TargetSearchData"), "gc-ms-data")

# import samples (see ImportSamples() for details)
samples <- ImportSamples(file.path(cdfpath, "samples.txt"), CDFpath = cdfpath)

# Import RI markers (see ImportFameSettings())
rim <- ImportFameSettings(file.path(cdfpath, "rimLimits.txt"))

# choose a sample at random and plot the m/z traces around the retention
# time window
ret <- checkRimLim(samples, rim)

# to choose a specific samples and marker, use subsetting
ret <- checkRimLim(samples[3], rim[2])

TargetSearch documentation built on March 12, 2021, 2 a.m.