Skip to contents

adductCharge() returns the charge of an adduct.

Usage

adductCharge(x)

Arguments

x

character with the adduct definition

Value

integer of length equal to x with the charge of the adduct/ion.

Examples


a <- c("[M+3H]3+", "[M+H]+", "[M-2H]2-", "[M-H]-")
adductCharge(a)
#> [1]  3  1 -2 -1