order.formula: Order a chemical formula correctly

Description Usage Arguments Author(s) See Also Examples

View source: R/formulaCalculator.R

Description

Orders a chemical formula in the commonly accepted order (CH followed by alphabetic ordering).

Usage

1

Arguments

formula

A molecular formula in string or list representation ("C6H6" or list(C=6,H=6)).

as.formula

If TRUE, the return value is returned as a string. This is the default.

as.list

If TRUE, the return value is returned in list representation.

Author(s)

Michele Stravs

See Also

list.to.formula, add.formula, is.valid.formula

Examples

1
2
3
#
order.formula("H4C9")
order.formula("C2N5HClBr")

RMassBank documentation built on Nov. 8, 2020, 6:06 p.m.