[CHNOSZ-commits] r434 - in pkg/CHNOSZ: . man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Apr 13 03:34:12 CEST 2019
Author: jedick
Date: 2019-04-13 03:34:09 +0200 (Sat, 13 Apr 2019)
New Revision: 434
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/man/EOSregress.Rd
pkg/CHNOSZ/man/retrieve.Rd
pkg/CHNOSZ/man/subcrt.Rd
Log:
add par(opar) to some examples
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2019-04-13 01:04:00 UTC (rev 433)
+++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 01:34:09 UTC (rev 434)
@@ -1,6 +1,6 @@
Date: 2019-04-13
Package: CHNOSZ
-Version: 1.3.1-14
+Version: 1.3.1-15
Title: Thermodynamic Calculations and Diagrams for Geochemistry
Authors at R: c(
person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),
Modified: pkg/CHNOSZ/man/EOSregress.Rd
===================================================================
--- pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 01:04:00 UTC (rev 433)
+++ pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 01:34:09 UTC (rev 434)
@@ -137,7 +137,7 @@
CH4coeffs <- EOScoeffs("CH4", "Cp")
## make plots comparing the regressions
## with the accepted EOS parameters of CH4
-par(mfrow=c(2,2))
+opar <- par(mfrow=c(2,2))
EOSplot(d, T.max=600)
title("Cp of CH4(aq), fit to 600 K")
legend("bottomleft", pch=1, legend="Hnědkovský and Wood, 1997")
@@ -147,6 +147,7 @@
title("Cp fit to 600 K, plot to 600 K")
EOSplot(d, coefficients=CH4coeffs, T.plot=600)
title("Cp from EOS parameters in database")
+par(opar)
# continuing from above, with user-defined variables
Theta <- 228 # K
@@ -173,7 +174,7 @@
varHKF <- c("invTTheta", "QBorn")
# alpha is the expansivity coefficient of water
varal <- c("invTTheta", "alpha")
-par(mfrow=c(2,2))
+opar <- par(mfrow=c(2,2))
# for both HKF and the expansivity equation
# we'll fit up to a temperature limit
EOSplot(d, varHKF, T.max=663, T.plot=625)
@@ -185,6 +186,7 @@
title("V of CH4(aq), HKF equation")
EOSplot(d, varal, T.max=663)
title("V of CH4(aq), expansivity equation")
+par(opar)
# note that the volume regression using the HKF gives
# a result for omega (coefficient on Q) that is
# not consistent with the high-T heat capacities
Modified: pkg/CHNOSZ/man/retrieve.Rd
===================================================================
--- pkg/CHNOSZ/man/retrieve.Rd 2019-04-13 01:04:00 UTC (rev 433)
+++ pkg/CHNOSZ/man/retrieve.Rd 2019-04-13 01:34:09 UTC (rev 434)
@@ -69,6 +69,7 @@
species(iMn)
a <- affinity(pH = c(6, 14), Eh = c(-1, 1))
diagram(a, fill = "terrain")
+\dontshow{par(thermo()$opar)}
}
\concept{Extended workflow}
Modified: pkg/CHNOSZ/man/subcrt.Rd
===================================================================
--- pkg/CHNOSZ/man/subcrt.Rd 2019-04-13 01:04:00 UTC (rev 433)
+++ pkg/CHNOSZ/man/subcrt.Rd 2019-04-13 01:34:09 UTC (rev 434)
@@ -267,7 +267,7 @@
# but we go to -30 knowing properties will become NA
sb <- subcrt(c("H2O", "Na+"), T=seq(-30, 10), P=1)$out
# start plot with extra room on right
-par(mar=c(5, 4, 4, 4))
+opar <- par(mar=c(5, 4, 4, 4))
# plot G
plot(sb$water$T, sb$water$G, ylim=c(-63000, -56000), xlab=axis.label("T"),
ylab=axis.label("DG0"))
@@ -284,6 +284,7 @@
Na <- expr.species("Na+")
degC <- expr.units("T")
title(main=substitute(H2O~and~Na~to~-20~degC, list(H2O=H2O, Na=Na, degC=degC)))
+par(opar)
## Calculations using a variable-pressure standard state
thermo("opt$varP" = TRUE)
More information about the CHNOSZ-commits
mailing list