Learn R Programming

bio3d (version 2.4-4)

formula2mass: Chemical Formula to Mass Converter

Description

Compute the molar mass associated to a chemical formula.

Usage

formula2mass(form, sum.mass = TRUE)

Value

Return a single element numeric vector containing the mass corresponding to a given chemical formula.

Arguments

form

a character string containing a chemical formula on the form: 'C3 H5 N O1'.

sum.mass

logical, should the mass of each element be summed.

Author

Lars Skjaerven

Details

Compute the molar mass (in g.mol-1) associated to a chemical formula.

See Also

atom2ele, atom2mass

Examples

Run this code
#formula2mass("C5 H6 N O3")

Run the code above in your browser using DataLab