Skip to contents

standardizeSingleCharge() replaces the short-hand notation of single charges eventually present in adduct definition with the standard notion, i.e., it replaces "+" with "1+" in e.g. "[M+H]+" and "-" with "1-" in "[M-H]-".

Usage

standardizeSingleCharge(x)

Arguments

x

character with adduct definitions

Value

character with standardized single charge definitions.

See also

Examples


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