matchExpSpec: Match a GC-MS pseudospectrum to a database with a weighted...

Description Usage Arguments Value Author(s) Examples

View source: R/matchfuns.R

Description

Function matchExpSpec calculates match factors for a pseudospectrum with all entries in the database. A plot of the best match can be provided.

Usage

1
2
matchExpSpec(pspec, DB, DB.treated, plotIt = FALSE,
             scale.p = c("sqrt", "none"), mass.weight = TRUE, ...)

Arguments

pspec

The pseudospectrum, a two- or three-column matrix where the third column (the retention time) will be ignored.

DB

Database of standards.

DB.treated

Logical, indicating whether the database has already been scaled (TRUE) or not.

plotIt

Logical: show best match?

scale.p

indicates whether "sqrt" scaling or no scaling ("none") is to be applied. This should usually be "sqrt".

mass.weight

Logical, indicating whether heavier masses receive higher weight. Should usually be TRUE.

...

Further arguments for the pseudospectrum plot (if shown).

Value

A vector of match factors.

Author(s)

Ron Wehrens

Examples

1
2
3
4
data(threeStdsNIST) ## gives smallDB, containing 78 patterns
data(threeStdsDB)   ## gives DB, containing 3 patterns :-D

matchExpSpec(DB[[1]]$pspectrum, smallDB, DB.treated = FALSE, plotIt = TRUE)

metaMS documentation built on Nov. 8, 2020, 8:21 p.m.