ListFormula {OrgMassSpecR}R Documentation

Convert an Elemental Formula to a List

Description

Convert a character string representing an elemental formula to a list representing the elemental formula. The list can be used as input to other functions.

Usage

ListFormula(elemental.formula)

Arguments

elemental.formula

character string representing the elemental formula.

Details

To maintain compatibility with MolecularWeight, MonoisotopicMass, and IsotopicDistribution the elemental formula can contain only C,H,N,O,S,P,Br,Cl,F,I,Si, and Sn (I and Sn are default elements in MolecularWeight only). Elements not in this set will be ignored and a warning will be generated. The function can handle repeated elements, but not element multiplication indicated by parenthesis.

Known issue: Lower case letters after numbers, such as the “o” in “C12oBr5H5” will not be caught with a warning and the resulting list will contain the incorrect number of elements.

Author(s)

Nathan G. Dodder

See Also

ConvertPeptide

Examples

ListFormula("C14H8Cl4")
ListFormula("C6H5OH")
ListFormula("C15H12I3NO4")

[Package OrgMassSpecR version 0.5-3 Index]