molMass calculates the molar mass of any organic compound (and some salts) based on its chemical formula.
Usage
molMass(form)
Arguments
form
a chemical formula, as a character vector of length one, e.g., "C6H12O6" for glucose or "CH3COOH" for acetic acid.
Not case-sensitive for single letter elements (see 'Details').
Value
Length one numeric vector with molar mass (g/mol)
concept
biogas
chemistry
Details
Atomic weights are from CIAAW, and were rounded to four digits or more if possible.
molMass can handle two letter elements (see 'Examples') but in this case form is case-sensitive.