
Calculate PPM
ppm.RdThis helper function should be used in mz_to_comp() as the tol argument.
It makes the function using PPM as dynamic tolerance.
Value
A function that takes a numeric vector of m/z values and returns a numeric vector of tolerances.
Examples
ppm(10)(2368.84)
#> [1] 0.0236884
ppm(10)(c(2368.84, 2368.85))
#> [1] 0.0236884 0.0236885