Skip to contents

Given a theoretical m/z value, and a ppm error tolerance, this function calculates the lower and upper m/z values.

Usage

ppm_range(mz, ppm)

Arguments

mz

a double, the theoretical m/z value.

ppm

a double, the mass error in ppm

Value

a vector of two elements containing the upper and lower m/zvalues given the provided mass error tolerance.

Examples


chlorogenic_acid_pos <- 355.1023
ppm_error <- 10
ppm_range(mz = chlorogenic_acid_pos, ppm = ppm_error)
#> [1] 355.0987 355.1059