matchExpSpec {metaMS} | R Documentation

## Match a GC-MS pseudospectrum to a database with a weighted crossproduct criterion.

### 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

    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

    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)

[Package metaMS version 1.22.0 Index]