[CHNOSZ-commits] r312 - in pkg/CHNOSZ: . R inst man tests/testthat
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Mar 30 16:50:10 CEST 2018
Author: jedick
Date: 2018-03-30 16:50:10 +0200 (Fri, 30 Mar 2018)
New Revision: 312
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/equilibrate.R
pkg/CHNOSZ/inst/NEWS
pkg/CHNOSZ/man/berman.Rd
pkg/CHNOSZ/tests/testthat/test-diagram.R
pkg/CHNOSZ/tests/testthat/test-equilibrate.R
Log:
fix minor typos
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2018-03-28 06:01:10 UTC (rev 311)
+++ pkg/CHNOSZ/DESCRIPTION 2018-03-30 14:50:10 UTC (rev 312)
@@ -1,6 +1,6 @@
-Date: 2018-03-28
+Date: 2018-03-30
Package: CHNOSZ
-Version: 1.1.3-19
+Version: 1.1.3-20
Title: Thermodynamic Calculations for Geobiochemistry
Authors at R: c(
person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),
Modified: pkg/CHNOSZ/R/equilibrate.R
===================================================================
--- pkg/CHNOSZ/R/equilibrate.R 2018-03-28 06:01:10 UTC (rev 311)
+++ pkg/CHNOSZ/R/equilibrate.R 2018-03-30 14:50:10 UTC (rev 312)
@@ -295,7 +295,7 @@
}
# the name of the basis species (need this if we got ibalance which which.balance, above)
balance <- colnames(aout$species)[ibalance[1]]
- message(paste("balance: from moles of", balance, "in formation reactions"))
+ message(paste("balance: moles of", balance, "in formation reactions"))
# the balance vector
n.balance <- aout$species[, ibalance[1]]
# we check if that all formation reactions contain this basis species
Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS 2018-03-28 06:01:10 UTC (rev 311)
+++ pkg/CHNOSZ/inst/NEWS 2018-03-30 14:50:10 UTC (rev 312)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.1.3-19 (2018-03-28)
+CHANGES IN CHNOSZ 1.1.3-20 (2018-03-30)
---------------------------------------
THERMODYNAMIC DATA
Modified: pkg/CHNOSZ/man/berman.Rd
===================================================================
--- pkg/CHNOSZ/man/berman.Rd 2018-03-28 06:01:10 UTC (rev 311)
+++ pkg/CHNOSZ/man/berman.Rd 2018-03-30 14:50:10 UTC (rev 312)
@@ -33,7 +33,7 @@
The equation used for volume is \I{V}(\P, \T) / \I{V}(1 bar, 298.15 K) = 1 + v1 * (\T - 298.15) + v2 * (\T - 298.15)\S{2} + v3 * (\P - 1) + v4 * (\P - 1)\S{2}.
The parameters correspond to Tables 2 (\code{GfPrTr}, \code{HfPrTr}, \code{SPrTr}, \code{VPrTr}), 3a (\code{k0} to \code{k3}), 4 (\code{v1} to \code{v4}), 3b (transition parameters: \code{Tlambda} to \code{dTH}), and 5 (disorder parameters: \code{Tmax}, \code{Tmin}, and \code{d1} to \code{d5}) of Berman (1988).
Following the winTWQ data format, multipliers are applied to the volume parameters only (see below).
-Note that \code{VPrTr} is tabulated in J mol\S{-1}, which is equal to 10 cm\S{3} mol\S{-1}.
+Note that \code{VPrTr} is tabulated in J bar\S{-1} mol\S{-1}, which is equal to 10 cm\S{3} mol\S{-1}.
A value for \code{GfPrTr} is optional and is not used in the calculations (see below).
Numeric values (possibly 0) should be assigned for all of \code{HfPrTr}, \code{SPrTr}, \code{VPrTr}, \code{k0} to \code{k6} and \code{v1} to \code{v4}.
Modified: pkg/CHNOSZ/tests/testthat/test-diagram.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-diagram.R 2018-03-28 06:01:10 UTC (rev 311)
+++ pkg/CHNOSZ/tests/testthat/test-diagram.R 2018-03-30 14:50:10 UTC (rev 312)
@@ -5,7 +5,7 @@
basis("CHNOS")
species(c("glycine", "alanine"))
a <- affinity()
- expect_message(diagram(a, plot.it=FALSE), "balance: from moles of CO2 in formation reactions")
+ expect_message(diagram(a, plot.it=FALSE), "balance: moles of CO2 in formation reactions")
e <- equilibrate(a)
expect_error(diagram(e, "Z"), "Z is not a valid diagram type")
})
@@ -22,7 +22,7 @@
# we can't calculate the equilibrium activity of a basis species if it's externally buffered
expect_error(diagram(a, "O2"), "is not numeric - was a buffer selected\\?")
# this one works - a barplot of A/2.303RT
- expect_message(diagram(a, plot.it=FALSE), "balance: from moles of CO2 in formation reactions")
+ expect_message(diagram(a, plot.it=FALSE), "balance: moles of CO2 in formation reactions")
# if we're plotting A/2.303RT the values can be divided by balancing coefficient or not
d.1 <- diagram(a, balance=1, plot.it=FALSE)
d.CO2 <- diagram(a, plot.it=FALSE)
Modified: pkg/CHNOSZ/tests/testthat/test-equilibrate.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-equilibrate.R 2018-03-28 06:01:10 UTC (rev 311)
+++ pkg/CHNOSZ/tests/testthat/test-equilibrate.R 2018-03-30 14:50:10 UTC (rev 312)
@@ -19,7 +19,7 @@
test_that("equilibrate() gives expected messages and errors for balance calculation", {
# the following error is triggered by equil.react, not equil.boltzmann
expect_error(equilibrate(aone), "at least two species needed")
- expect_message(equilibrate(aacid), "balance: from moles of CO2")
+ expect_message(equilibrate(aacid), "balance: moles of CO2")
expect_message(equilibrate(aacid), "n.balance is 2 1 1 2")
expect_message(equilibrate(aacid), "loga.balance is -2.221848")
expect_message(equilibrate(aacid, loga.balance=-3), "loga.balance is -3")
More information about the CHNOSZ-commits
mailing list