[CHNOSZ-commits] r40 - in pkg/CHNOSZ: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 2 07:30:41 CET 2013


Author: jedick
Date: 2013-02-02 07:30:41 +0100 (Sat, 02 Feb 2013)
New Revision: 40

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/findit.R
   pkg/CHNOSZ/R/revisit.R
   pkg/CHNOSZ/inst/NEWS
Log:
enable DGtr objective in findit(), 1-D DGtr plot in revisit()


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2013-01-26 05:26:34 UTC (rev 39)
+++ pkg/CHNOSZ/DESCRIPTION	2013-02-02 06:30:41 UTC (rev 40)
@@ -1,6 +1,6 @@
-Date: 2013-01-26
+Date: 2013-02-02
 Package: CHNOSZ
-Version: 0.9-9.2
+Version: 0.9-9.3
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey M. Dick
 Maintainer: Jeffrey M. Dick <jmdick at asu.edu>

Modified: pkg/CHNOSZ/R/findit.R
===================================================================
--- pkg/CHNOSZ/R/findit.R	2013-01-26 05:26:34 UTC (rev 39)
+++ pkg/CHNOSZ/R/findit.R	2013-02-02 06:30:41 UTC (rev 40)
@@ -119,7 +119,7 @@
     a <- do.call(affinity,aargs)
     # then calculate the values of the objective function
     e <- equilibrate(a, balance=balance, loga.balance=loga.balance, normalize=normalize)
-    dd <- revisit(e$loga.equil, objective, loga2=loga2)$H
+    dd <- revisit(e, objective, loga2=loga2, plot.it=FALSE)$H
     # coordinates of the extreme value (take only the first set of coords)
     iopt <- optimal.index(dd, objective)[1,, drop=FALSE]
     # the extreme value

Modified: pkg/CHNOSZ/R/revisit.R
===================================================================
--- pkg/CHNOSZ/R/revisit.R	2013-01-26 05:26:34 UTC (rev 39)
+++ pkg/CHNOSZ/R/revisit.R	2013-02-02 06:30:41 UTC (rev 40)
@@ -120,11 +120,15 @@
   # 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)
+    if(nd==0) Astar <- t(Astar)
   }
 
   # calculation of the objective function
-  # "H" is a remnant of the first target, shannon entropy
+  # the symbol "H" is reminiscent of the first implemented target, shannon entropy
   if(length(objargs) == 1) H <- objfun(a1)
   else if(length(objargs) == 2) H <- objfun(a1, a2)
   else if(length(objargs) == 3) H <- objfun(a1, a2, Astar)
@@ -161,7 +165,7 @@
         # add a 1:1 line
         lines(range(loga2), range(loga2), col="grey")
         # add a lowess line
-        ls <- loess.smooth(loga2, loga1)
+        ls <- loess.smooth(loga2, loga1, family="gaussian")
         lines(ls$x, ls$y, col="red")
       } else plot.it <- FALSE
       # add a title

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2013-01-26 05:26:34 UTC (rev 39)
+++ pkg/CHNOSZ/inst/NEWS	2013-02-02 06:30:41 UTC (rev 40)
@@ -12,6 +12,8 @@
 
 - Add example for LYSC_CHICK to protein.info.Rd.
 
+- Enable DGtr in findit(), 1-D DGtr plot in revisit().
+
 CHANGES IN CHNOSZ 0.9-9 (2013-01-01)
 ------------------------------------
 



More information about the CHNOSZ-commits mailing list