Skip to content
Prev 245824 / 398506 Next

Parsing a Simple Chemical Formula

Hi David & others...

I did find the function you recommended, plus, it's even easier (but a  
little hidden in the doc): >element(form, "mass").  But, this uses the  
atomic masses from the periodic table, which are weighted averages of  
the isotopes of each element.  What I'm doing actually involves mass  
spectrometry, so I need the isotope masses, which are integers (think  
12C, 13C, 14C, but the periodic table says 12.011 reflecting the  
relative abundances).  I used Gabor's solution and got my little  
function humming.  Plus, I have several things to read through from  
the various recommendations.

Thanks again, Bryan
On Dec 26, 2010, at 10:21 PM, David Winsemius wrote: