Skip to content
Prev 245816 / 398506 Next

Parsing a Simple Chemical Formula

p.s.  help(pac=CHNOSZ) reveals that this package has 3 vignettes.  I 
have not looked at these vignettes, but most vignettes provide excellent 
introductions (though rarely with complete coverage) of important 
capabilities of the package.  (The 'sos' package includes a vignette, 
which exposes more capabilities than the example below.)


######################
       Have you considered the 'CHNOSZ' package?
count
C      5
H     11
Br     1
O      1


       I found this using the 'sos' package as follows:


library(sos)
cf <- ???'chemical formula'
found 21 matches;  retrieving 2 pages
cf


       The print method for "cf" opened the results in a web browser, 
which showed that the "CHNOSZ" package had 14 of these 11 matches, and 
the other 7 were in 7 different packages.  Moreover, the "CHNOSZ" 
package is devoted to "Chemical Thermodynamics and Activity Diagrams" 
and provides many more capabilities that might interest you.


       Hope this helps.
       Spencer
On 12/26/2010 5:01 PM, Bryan Hanson wrote: