Skip to contents

Given a theoretical m/z value and ppm tolerance, it computes the m/z deviation.

Usage

get_ppm(mz, ppm = 10)

Arguments

mz

a double, the theoretical m/z value.

ppm

a double, the ppm error tolerance.

Value

a double with the m/z value deviation from the given theoretical m/z value

Examples

get_ppm(mz = 355.1023, ppm = 20)
#> [1] 0.007102046

# Chlorogenic acid [M+H]+ = 355.1023 m/z
chlorogenic_acid_pos <- 355.1023
ppm_error <- 10
get_ppm(mz = chlorogenic_acid_pos, ppm = ppm_error)
#> [1] 0.003551023