Get chemical formula for mass to charge ratio.
getformula(
mz,
charge = 0,
window = 0.001,
elements = list(C = c(1, 50), H = c(1, 50), N = c(0, 50), O = c(0, 50), P = c(0, 1), S
= c(0, 1))
)
list with chemical formula
a vector with mass to charge ratio
The charge value of the formula, default 0 for autodetect
The window accuracy in the same units as mass
Elements list to take into account.