Learn R Programming

RMassBank (version 2.0.0)

ppm: Calculate ppm values

Description

Calculates ppm values for a given mass.

Usage

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.

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).

Details

This is a helper function used in RMassBank code.

Examples

Run this code
ppm(100, 10)

Run the code above in your browser using DataLab