ppm: Calculate ppm values

Description Usage Arguments Details Value Author(s) Examples

View source: R/formulaCalculator.R

Description

Calculates ppm values for a given mass.

Usage

1
ppm(mass, dppm, l = FALSE, p = FALSE)

Arguments

mass

The "real" mass

dppm

The mass deviation to calculate

l

Boolean: return limits? Defaults to FALSE.

p

Boolean: return ppm error itself? Defaults to FALSE.

Details

This is a helper function used in RMassBank code.

Value

By default (l=FALSE, p=FALSE) the function returns the mass plus the ppm error (for 123.00000 and 10 ppm: 123.00123, or for 123 and -10 ppm: 122.99877).

For l=TRUE, the function returns the upper and lower limit (sic!) For p=TRUE, just the difference itself is returned (0.00123 for 123/10ppm).

Author(s)

Michael A. Stravs, Eawag <michael.stravs@eawag.ch>

Examples

1
ppm(100, 10)

sneumann/RMassBank documentation built on Oct. 20, 2020, 3:19 p.m.