Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

formula2mass

Chemical Formula to Mass Converter


Description

Compute the molar mass associated to a chemical formula.

Usage

formula2mass(form, sum.mass = TRUE)

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.

Details

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

Value

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

Author(s)

Lars Skjaerven

See Also

Examples

#formula2mass("C5 H6 N O3")

bio3d

Biological Structure Analysis

v2.4-2
GPL (>= 2)
Authors
Barry Grant [aut, cre], Xin-Qiu Yao [aut], Lars Skjaerven [aut], Julien Ide [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.