[CHNOSZ-commits] r47 - in pkg/CHNOSZ: . R inst inst/doc inst/tests man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 14 02:06:37 CET 2013


Author: jedick
Date: 2013-03-14 02:06:37 +0100 (Thu, 14 Mar 2013)
New Revision: 47

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/revisit.R
   pkg/CHNOSZ/inst/CHECKLIST
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/inst/doc/wjd.pdf
   pkg/CHNOSZ/inst/tests/test-util.data.R
   pkg/CHNOSZ/man/revisit.Rd
   pkg/CHNOSZ/vignettes/wjd.Rnw
   pkg/CHNOSZ/vignettes/wjd.lyx
Log:
pass R CMD check using R configured with --disable-long-double


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/DESCRIPTION	2013-03-14 01:06:37 UTC (rev 47)
@@ -1,6 +1,6 @@
-Date: 2013-03-11
+Date: 2013-03-14
 Package: CHNOSZ
-Version: 0.9-9.7
+Version: 0.9-9.8
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey M. Dick
 Maintainer: Jeffrey M. Dick <jmdick at asu.edu>

Modified: pkg/CHNOSZ/R/revisit.R
===================================================================
--- pkg/CHNOSZ/R/revisit.R	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/R/revisit.R	2013-03-14 01:06:37 UTC (rev 47)
@@ -120,7 +120,6 @@
   # construct array of values: Astar (for DGtr)
   if(any(grepl("Astar", objargs))) {
     Astar <- eout$Astar[ispecies]
-eout <<- eout
     # one row for each condition
     Astar <- sapply(Astar, as.vector)
     # for 0-D case we want a 1-row matrix (sapply simplifies to vector)
@@ -161,12 +160,14 @@
         # plot the points for a referenced objective
         ylab <- "loga1"
         xlab <- "loga2"
-        plot(loga2, loga1, xlab=xlab, ylab=ylab, pch=pch, col=col)
+        plot(loga2, loga1, xlab=xlab, ylab=ylab, pch=pch, col=col, xlim=xlim, ylim=ylim)
         # add a 1:1 line
         lines(range(loga2), range(loga2), col="grey")
         # add a lowess line
-        ls <- loess.smooth(loga2, loga1, family="gaussian")
-        lines(ls$x, ls$y, col="red")
+        if(!is.null(lwd)) {
+          ls <- loess.smooth(loga2, loga1, family="gaussian")
+          lines(ls$x, ls$y, col="red", lwd=lwd)
+        }
       } else plot.it <- FALSE
       # add a title
       if(missing(main)) main <- paste(objective, "=", round(H,3)) 

Modified: pkg/CHNOSZ/inst/CHECKLIST
===================================================================
--- pkg/CHNOSZ/inst/CHECKLIST	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/inst/CHECKLIST	2013-03-14 01:06:37 UTC (rev 47)
@@ -31,3 +31,6 @@
 - test read.supcrt(), write.supcrt() on e.g. slop98.dat
 
 - update .Rinstignore with any new/deleted files
+
+- run R CMD check using R compiled without long doubles (as in Solaris checks on CRAN)
+  (CFLAGS=-ffloat-store ./configure --disable-long-double)

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/inst/NEWS	2013-03-14 01:06:37 UTC (rev 47)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 0.9-9.7 (2013-03-11)
+CHANGES IN CHNOSZ 0.9-9.8 (2013-03-14)
 --------------------------------------
 
 - Fix calculation of free energy derivative in wjd().
@@ -57,7 +57,10 @@
 - EOSlab() gets label from attribute (if present) of user-defined
   function.
 
+- Modify test-util.data.R and wjd.Rd to pass R CMD check using R
+  configured with --disable-long-double .
 
+
 CHANGES IN CHNOSZ 0.9-9 (2013-01-01)
 ------------------------------------
 

Modified: pkg/CHNOSZ/inst/doc/wjd.pdf
===================================================================
(Binary files differ)

Modified: pkg/CHNOSZ/inst/tests/test-util.data.R
===================================================================
--- pkg/CHNOSZ/inst/tests/test-util.data.R	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/inst/tests/test-util.data.R	2013-03-14 01:06:37 UTC (rev 47)
@@ -26,10 +26,10 @@
   # G is set higher; is there an incorrect group value somewhere?
   expect_true(max(abs(obigt.calc$G - obigt.ref$G)) < 31)
   expect_true(max(abs(obigt.calc$H - obigt.ref$H)) == 0)
-  expect_true(max(abs(obigt.calc$S - obigt.ref$S)) < 0.02000001)
-  expect_true(max(abs(obigt.calc$Cp - obigt.ref$Cp)) < 0.04)
-  expect_true(max(abs(obigt.calc$V - obigt.ref$V)) < 0.1)
-  expect_true(max(abs(obigt.calc$a1.a - obigt.ref$a1.a)) < 0.01)
+  expect_true(max(abs(obigt.calc$S - obigt.ref$S)) < 0.02001)
+  expect_true(max(abs(obigt.calc$Cp - obigt.ref$Cp)) < 0.04001)
+  expect_true(max(abs(obigt.calc$V - obigt.ref$V)) < 0.1001)
+  expect_true(max(abs(obigt.calc$a1.a - obigt.ref$a1.a)) < 0.01001)
   expect_true(max(abs(obigt.calc$a2.b - obigt.ref$a2.b)) < 1e-13)
   expect_true(max(abs(obigt.calc$a3.c - obigt.ref$a3.c)) < 1e-14)
 })

Modified: pkg/CHNOSZ/man/revisit.Rd
===================================================================
--- pkg/CHNOSZ/man/revisit.Rd	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/man/revisit.Rd	2013-03-14 01:06:37 UTC (rev 47)
@@ -52,8 +52,12 @@
 Generally, \code{loga2} must be a numeric vector with length equal to that of \code{loga1} (i.e., number of species).
 If a single numeric value is supplied for \code{loga2}, it is recycled to the length of \code{loga1}.
 
+For calculations at a single condition (0-D, no variation), with the \samp{qqr} objective, a quantile-quantile plot (\code{\link{qqnorm}}) is shown.
+For \samp{rmsd} and other objective functions having reference values (\code{loga2}), a scatter plot is shown with a smooth line calculated using \code{\link{loess.smooth}}.
+The line can be suppressed using \code{lwd=NULL}.
+Otherwise, no plot is made for 0-D calculations for the other objective functions.
+
 If \code{plot.it} is TRUE, and \code{eout} is the output from \code{equilibrate}, and the number of variables is 1 or 2, the results are plotted --- a line diagram in 1 dimension or a contour plot in 2 dimensions.
-No plot is made for calculations at a single condition (0-D, no variation), except for the \code{qqr} objective, showing a quantile-quantile plot (\code{\link{qqnorm}}).
 \code{style.2D} can be set to \code{\link{image}} to fill the plot with colors instead of the \code{\link{contour}} plot that is the default.
 
 If \code{plot.optval} is TRUE, the location of the optimum (or optima) is indicated by a dashed vertical line(s) on a 1-D plot or a point(s) marked by an asterisk on a 2-D plot.
@@ -63,7 +67,7 @@
 An alternative source for the \code{eout} argument is any list of numeric values, each element of which corresponds to a different observation (such as a single species), all having the same dimensions (as vectors, matrices or higher-dimensional arrays)
 In this case, plotting is disabled, since the names of the variables are not in the input.
 
-\samp{revisit} is a loose anagram of \samp{diversity}, which was the provisional name of the function but was changed in CHNOSZ-0.9.
+\samp{revisit} is a partial anagram of \samp{diversity}, which was the provisional name of the function but was changed in CHNOSZ-0.9.
 While the \code{\link[vegan]{diversity}} function (in \pkg{vegan}) operates on a matrix with (biological) species on the columns, \code{revisit} operates on a list with (chemical) species as the elements of the list.
 The name of the \samp{H} output value is the conventional symbol for the Shannon diversity index, which was the first target statistic to be implemented in \code{revisit}.
 

Modified: pkg/CHNOSZ/vignettes/wjd.Rnw
===================================================================
--- pkg/CHNOSZ/vignettes/wjd.Rnw	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/vignettes/wjd.Rnw	2013-03-14 01:06:37 UTC (rev 47)
@@ -472,10 +472,12 @@
 = 1.261905). That FALSE means the chemical potentials of the elements
 calculated from different combinations of species differ by more than
 0.01, the default setting of \texttt{tol} in \texttt{is.near.equil()}.
-We can make it TRUE by running more iterations:
+We can make it TRUE by running more iterations and increasing the
+number of intervals tested for fractional distance change at each
+step (\texttt{nlambda}):
 
 <<run_aa_equil>>=
-waa <- run.wjd(c(ialk, iaro), Y=rep(1, 8), imax=12, Gfrac=1e-14)
+waa <- run.wjd(c(ialk, iaro), Y=rep(1, 8), imax=20, Gfrac=1e-14, nlambda=501)
 is.near.equil(waa)
 @
 

Modified: pkg/CHNOSZ/vignettes/wjd.lyx
===================================================================
--- pkg/CHNOSZ/vignettes/wjd.lyx	2013-03-11 01:31:14 UTC (rev 46)
+++ pkg/CHNOSZ/vignettes/wjd.lyx	2013-03-14 01:06:37 UTC (rev 47)
@@ -67,22 +67,22 @@
 \branch short
 \selected 1
 \filename_suffix 0
-\color #000000
+\color #faf0e6
 \end_branch
 \branch long
 \selected 1
 \filename_suffix 0
-\color #101010
+\color #faf0e6
 \end_branch
 \branch stuff
 \selected 1
 \filename_suffix 0
-\color #000000
+\color #faf0e6
 \end_branch
 \branch inactive
 \selected 0
 \filename_suffix 0
-\color #000000
+\color #faf0e6
 \end_branch
 \index Index
 \shortcut idx
@@ -1289,7 +1289,7 @@
 
 \begin_layout Standard
 \begin_inset Branch short
-status collapsed
+status open
 
 \begin_layout Chunk
 
@@ -2066,7 +2066,12 @@
 is.near.equil()
 \family default
 .
- We can make it TRUE by running more iterations:
+ We can make it TRUE by running more iterations and increasing the number
+ of intervals tested for fractional distance change at each step (
+\family typewriter
+nlambda
+\family default
+):
 \end_layout
 
 \begin_layout Standard
@@ -2080,7 +2085,7 @@
 
 \begin_layout Chunk
 
-waa <- run.wjd(c(ialk, iaro), Y=rep(1, 8), imax=12, Gfrac=1e-14)
+waa <- run.wjd(c(ialk, iaro), Y=rep(1, 8), imax=20, Gfrac=1e-14, nlambda=501)
 \end_layout
 
 \begin_layout Chunk



More information about the CHNOSZ-commits mailing list