Skip to contents

This function calculates the mass of M

Usage

calculate_mass_of_m(adduct_string, mz, electron_mass = 0.0005485799)

Arguments

adduct_string

Adduct to be parsed

mz

mz

electron_mass

Electron mass

Value

A mass

Examples

calculate_mass_of_m(mz = 123.4567, adduct_string = "[M+H]+")
#>    n_iso 
#> 122.4483 
calculate_mass_of_m(mz = 123.4567, adduct_string = "[M+Na]+")
#>    n_iso 
#> 100.4664 
calculate_mass_of_m(mz = 123.456, adduct_string = "[2M1-C6H12O6 (hexose)+NaCl+H]2+")
#>    n_iso 
#> 214.4871