adductCharge() returns the charge of an adduct.
See also
Other adduct related functions:
adductFormula(),
adductNames(),
formula2mz(),
mass2mz(),
mz2mass(),
standardizeSingleCharge()
Examples
a <- c("[M+3H]3+", "[M+H]+", "[M-2H]2-", "[M-H]-")
adductCharge(a)
#> [1] 3 1 -2 -1
