multiplyElements: Multiply chemical formulas by a scalar

View source: R/chemFormula.R

multiplyElementsR Documentation

Multiply chemical formulas by a scalar

Description

multiplyElements Multiply the number of atoms of each element by a constant, positive, integer

Usage

multiplyElements(x, k)

Arguments

x

character strings with chemical formula

k

numeric(1) positive integer by which each formula will be multiplied.

Value

character strings with the standardized chemical formula.

Author(s)

Roger Gine

Examples


multiplyElements("H2O", 3)

multiplyElements(c("C6H12O6", "Na", "CH4O"), 2)


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