[CHNOSZ-commits] r277 - in pkg/CHNOSZ: . demo man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 5 06:08:13 CET 2017


Author: jedick
Date: 2017-11-05 06:08:12 +0100 (Sun, 05 Nov 2017)
New Revision: 277

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/demo/TCA.R
   pkg/CHNOSZ/man/IAPWS95.Rd
   pkg/CHNOSZ/vignettes/anintro.Rmd
Log:
demo/TCA.R: change equals signs to reaction arrrows


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2017-11-02 03:16:38 UTC (rev 276)
+++ pkg/CHNOSZ/DESCRIPTION	2017-11-05 05:08:12 UTC (rev 277)
@@ -1,6 +1,6 @@
-Date: 2017-11-02
+Date: 2017-11-05
 Package: CHNOSZ
-Version: 1.1.0-75
+Version: 1.1.0-76
 Title: Thermodynamic Calculations for Geobiochemistry
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/demo/TCA.R
===================================================================
--- pkg/CHNOSZ/demo/TCA.R	2017-11-02 03:16:38 UTC (rev 276)
+++ pkg/CHNOSZ/demo/TCA.R	2017-11-05 05:08:12 UTC (rev 277)
@@ -50,20 +50,22 @@
 fum <- quote(Fumarate^-2)
 h2 <- quote(H[2*(italic(aq))])
 mal <- quote(Malate^-2)
+# the reaction double arrow
+eq <- "\u21cc"
 sublist <- list(oxal=oxal, pyr=pyr, h2o=h2o, nox=nox, cit=cit, nred=nred,
                 co2=co2, hplus=hplus, aco=aco, iso=iso, ket=ket, adp=adp,
-                hpo4=hpo4, suc=suc, atp=atp, fum=fum, h2=h2, mal=mal)
+                hpo4=hpo4, suc=suc, atp=atp, fum=fum, h2=h2, mal=mal, eq=eq)
 # reaction titles
 rtitle <- list(
-  c(substitute("       "*oxal + pyr + h2o + nox == "", sublist), substitute(cit + nred + co2 + hplus, sublist)),
-  substitute(cit == aco + h2o, sublist),
-  substitute(aco + h2o == iso*"   ", sublist),
-  c(substitute(iso + nox == "", sublist), substitute(ket + nred + co2*"   ", sublist)),
-  c(substitute(ket + adp + hpo4 + nox == "", sublist), substitute(suc + atp + nred + co2, sublist)),
-  substitute(suc == fum + h2, sublist),
-  substitute(fum + h2o == mal, sublist),
-  c(substitute(mal + nox == "                 ", sublist), substitute(oxal + nred + hplus * "             ", sublist)),
-  c(substitute(pyr + 4*nox + adp + hpo4 + 2*h2o == "                  ", sublist),
+  c(substitute("        "*oxal + pyr + h2o + nox ~eq~ "", sublist), substitute(cit + nred + co2 + hplus, sublist)),
+  substitute(cit ~eq~ aco + h2o, sublist),
+  substitute(aco + h2o ~eq~ iso*"   ", sublist),
+  c(substitute(iso + nox ~eq~ "   ", sublist), substitute(ket + nred + co2*"   ", sublist)),
+  c(substitute(ket + adp + hpo4 + nox ~eq~ "", sublist), substitute("      "*suc + atp + nred + co2, sublist)),
+  c(substitute(suc ~eq~ "", sublist), substitute(fum + h2, sublist)),
+  substitute(fum + h2o ~eq~ mal, sublist),
+  c(substitute(mal + nox ~eq~ "                          ", sublist), substitute(oxal + nred + hplus * "             ", sublist)),
+  c(substitute(pyr + 4*nox + adp + hpo4 + 2*h2o ~eq~ "                    ", sublist),
     substitute(3*co2 + 4*nred + 2*hplus + atp + h2 * "           ", sublist))
 )
 # set up plot

Modified: pkg/CHNOSZ/man/IAPWS95.Rd
===================================================================
--- pkg/CHNOSZ/man/IAPWS95.Rd	2017-11-02 03:16:38 UTC (rev 276)
+++ pkg/CHNOSZ/man/IAPWS95.Rd	2017-11-05 05:08:12 UTC (rev 277)
@@ -39,7 +39,7 @@
 
 \examples{
 ## calculate pressure for given temperature, density
-P <- as.numeric(IAPWS95("P", T=500, rho=838.0235))
+IAPWS95("P", T=500, rho=838.0235)
 }
 
 \references{

Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd	2017-11-02 03:16:38 UTC (rev 276)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd	2017-11-05 05:08:12 UTC (rev 277)
@@ -150,7 +150,8 @@
 The major components of the package are shown in the figure below, which is an updated version of the diagram in @Dic08.
 Rectangles and ellipses represent functions and datasets; bold text indicates primary functions.
 
-![Structure of CHNOSZ.](CHNOSZ.png)
+<!-- https://stackoverflow.com/questions/14675913/how-to-change-image-size-markdown -->
+![Structure of CHNOSZ.](CHNOSZ.png){ width=75% }
 
 Many functions in CHNOSZ have no side effects.
 That is, the function only returns a result; to use the result elsewhere, it can be assigned to a variable with `<-`.
@@ -177,12 +178,13 @@
 The following pseudocode shows a common sequence of commands.
 In actual usage, the `...` are replaced by arguments that define the chemical species and variables:
 ```{r pseudocode, eval=FALSE}
+data(thermo)         ## initialize system settings
 basis(...)
 species(...)
 a <- affinity(...)
 e <- equilibrate(a)  ## optional
 diagram(e)           ## or diagram(a)
-data(thermo)         ## clear system settings
+data(thermo)         ## clear settings for next calculation
 ```
 
 # The basics
@@ -2031,7 +2033,7 @@
 However, the IAPWS-95 equations are useful for other applications, and may be extrapolated to a greater range of *T* and *P* than SUPCRT.
 See <span style="color:blue">`?water`</span> for more information, as well as the last example in <span style="color:blue">`?subcrt`</span>, where uncommenting the line for the `IAPWS95` option allows extrapolation to lower temperatures for supercooled water.
 
-More recently (late 2017), an implementation of the [Deep Earth Water](http://www.dewcommunity.org/) (DEW) model was added; see [optional data](#optional-data) for more information.
+More recently (late 2017), an implementation of the [Deep Earth Water](http://www.dewcommunity.org/) (DEW) model was added; see [Optional data](#optional-data) for more information.
 
 # Messages and errors
 



More information about the CHNOSZ-commits mailing list