data(thermo)
## basic operation
# view the license and news file
# marked dontrun because they open pagers
# that wait for the user to close them
info('licence')
info('CHNOSZ')
# run a consistency check on each species in the database
# (marked dontrun because it takes a while)
info()
## species information
# search for something named (or whose formula is) 'Fe'
t <- info('Fe')
# use the number to get the full record
info(t)
# it is possible to get a range of records
info(t:(t+3))
## dealing with states
# default order of preference for names: aq > gas > cr,liq
info(c('methane','ethanol','glycinate')) # aq, aq, aq
info(c('adenosine','alanine','hydroxyapatite')) # aq, aq, cr
# state argument overrides the default
info(c('ethanol','adenosine'),state=c('gas','cr'))
# formulas default to aqueous species, if available
info(c('CH4','CO2','CS2','MgO')) # aq, aq, gas, cr
# state argument overrides the default
info(c('CH4','CO2','MgO'),'gas') # gas, gas, NA
# exceptions to the aqueous default are O2 and H2
info('O2') # gas
## partial name or formula searches
info('ATP')
info('thiol')
info('MgC')
# add an extra character to refine a search
# or to search on terms that have exact matches
info('MgC?')
info('acetate?')
info('acetate ') # same as previous
info('XH2O')
## consistency check of properties and parameters
## of each species in database
# makred dontrun because it takes a while
info()
Run the code above in your browser using DataLab