ppm {RMassBank} | R Documentation

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

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

    ppm(100, 10)

[Package RMassBank version 2.8.0 Index]