Learn R Programming

CHNOSZ (version 1.0.0)

examples: Run Examples from the Documentation

Description

Run the examples contained in each of the documentation topics.

Usage

examples(do.png = FALSE)
  demos(which = c("sources", "NaCl", "cordierite",
    "phosphate", "nucleobase", "orp", "findit", 
    "CO2Ac", "nonideal"))

Arguments

do.png
logical, generate PNG files for the plots?
which
character, which example to run.

encoding

UTF-8

Details

examples runs all the examples in the documentation for the package. example is called for each topic with ask set to FALSE (so all of the figures are shown without prompting the user). If do.png is TRUE, the plots in the examples are saved as png files having names beginning with the name of each of the help topics.

demos is a function to run other examples that are provided as demos. demo is called with settings to not echo the source code and to not ask before making each plot. The demo(s) to run is/are specified by which; the default is to run them in the order of the list below. See the comments in the source code for more information about each demo.

ll{ sources cross-check the reference list with the thermodynamic database NaCl equilibrium constant for aqueous NaCl dissociation (Shock et al., 1992) cordierite equilibrium constant of hydrous cordierite dehydration phosphate phosphate speciation with pH, temperature and ionic strength nucleobase relative stabilities of nucleobases and some amino acids orp oxidation-reduction potential of redox standards as a function of temperature findit detailed example of usage of findit using log-normal distribution as an objective CO2Ac activity of CO2 buffered by acetic acid; comparing affinity(return.buffer=TRUE) with diagram(what="CO2") nonideal activity coefficient of charged species (Alberty, 2003), using the IS argument of subcrt }

References

Alberty, R. A. (2003) Thermodynamics of Biochemical Reactions, John Wiley & Sons, Hoboken, New Jersey, 397 p. http://www.worldcat.org/oclc/51242181 Shock, E. L., Oelkers, E. H., Johnson, J. W., Sverjensky, D. A. and Helgeson, H. C. (1992) Calculation of the thermodynamic properties of aqueous species at high pressures and temperatures: Effective electrostatic radii, dissociation constants and standard partial molal properties to 1000 $^{\circ}$C and 5 kbar. J. Chem. Soc. Faraday Trans. 88, 803--826. http://dx.doi.org/10.1039/FT9928800803

Examples

Run this code
data(thermo)
demos(c("orp", "NaCl"))
par(thermo$opar)
# use the following to run examples in all help topics
examples()

Run the code above in your browser using DataLab