pasteElements: Create chemical formula from a named vector

View source: R/chemFormula.R

pasteElementsR Documentation

Create chemical formula from a named vector

Description

pasteElements creates a chemical formula from element counts (such as returned by countElements()).

Usage

pasteElements(x)

Arguments

x

list/integer with element counts, names being individual elements.

Value

character() with the chemical formulas.

Author(s)

Michael Witting and Sebastian Gibb

See Also

countElements()

Examples


elements <- c("C" = 6, "H" = 12, "O" = 6)
pasteElements(elements)

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