mz: Calculate accurate mass-to-charge ratio

View source: R/mz.R

mzR Documentation

Calculate accurate mass-to-charge ratio

Description

Calculate accurate mass-to-charge ratio (m/z)

Usage

mz(m, z, caseSensitive = FALSE)

Arguments

m

chemical formula of an ion, case insensitive

z

charge

caseSensitive

if case sensitive is 'FALSE' (default), the elements are seperated by numbers. for instance, Carbon dioxyde can be written as 'c1o2' or any combination of the two elements in lower or upper cases. However, the number of elements should be clearly stated in the chemical formula. if case sensitive is 'TRUE', the elements are seperated by upper case letters. For instance, Carbon dioxyde must be written as 'C1O2' or ‘CO2'. You don’t meed to write the number of the element if it is 1.

Author(s)

Yonghui Dong

Examples

 mz('C7h7o1', z = 1)
 mz('C7H7O', z = 1, caseSensitive = TRUE)
 mz(c('C7H7O4', 'C'), z = -1, caseSensitive = TRUE) # vector input
 mz(c('c7h7O4', 'c1'), z = -1)

MSbox documentation built on Dec. 8, 2022, 5:10 p.m.

Related to mz in MSbox...