ppm: Calculate ppm values
Description
Calculates ppm values for a given mass.
Usage
ppm(mass, dppm, l = FALSE, p = FALSE)
Arguments
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.