countElements: Count elements in a chemical formula

View source: R/chemFormula.R

countElementsR Documentation

Count elements in a chemical formula

Description

countElements parses strings representing a chemical formula into a named vector of element counts.

Usage

countElements(x)

Arguments

x

character() representing a chemical formula.

Value

list of integer with the element counts (names being elements).

Author(s)

Michael Witting and Sebastian Gibb

See Also

pasteElements()

Examples

countElements(c("C6H12O6", "C11H12N2O2"))

rformassspectrometry/MetaboCoreUtils documentation built on Oct. 2, 2024, 5:13 a.m.