parse_adduct: Parse adduct

View source: R/parse_adduct.R

parse_adductR Documentation

Parse adduct

Description

This function parses adducts

Usage

parse_adduct(
  adduct_string,
  regex = "\\[(\\d*)M(?![a-z])(\\d*)([+-][\\w\\d].*)?.*\\](\\d*)([+-])?"
)

Arguments

adduct_string

Adduct to be parsed

regex

Regex used for parsing

Value

Parsed elements from adduct

Examples

parse_adduct("[M+H]+")
parse_adduct("[2M1-C6H12O6 (hexose)+NaCl+H]2+")

taxonomicallyinformedannotation/tima-r documentation built on Nov. 20, 2024, 4:34 a.m.