[Dplr-commits] r931 - in pkg/dplR: . inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 1 18:11:59 CET 2015


Author: mvkorpel
Date: 2015-01-01 18:11:59 +0100 (Thu, 01 Jan 2015)
New Revision: 931

Modified:
   pkg/dplR/ChangeLog
   pkg/dplR/DESCRIPTION
   pkg/dplR/inst/unitTests/runit.dplR.R
Log:
Edited ChangeLog, changed unit tests to avoid identicality checks

Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog	2014-12-31 08:35:50 UTC (rev 930)
+++ pkg/dplR/ChangeLog	2015-01-01 17:11:59 UTC (rev 931)
@@ -1,3 +1,10 @@
+* CHANGES IN dplR VERSION 1.6.2
+
+No functional changes.  A unit test was changed so it would not fail
+on the solaris-sparc CRAN platform.  Also in some other tests,
+identicality checks were replaced with near equality checks.
+
+
 * CHANGES IN dplR VERSION 1.6.1
 
 
@@ -3,13 +10,13 @@
 File: glk.R and glk.Rd
 -------------
-- Modified by Christian Zang in reponse to a bug report by Allan Buras. In the
-  case of  no change from year i to year i+1 in both series then the glk sign
-  will for both be 0 and the sum of both is then also 0 and will not be 
+- Modified by Christian Zang in response to a bug report by Allan Buras. In the
+  case of no change from year i to year i+1 in both series then the glk sign
+  will for both be 0 and the sum of both is then also 0 and will not be
   accounted for correctly in the sum of synchronous years. Zang and Buras have
-  pached and Zang updates the help file to reflect the change as:
-  "This implementation improves the original formulation inasmuch as the case 
-  of neighbouring identical measurements in the same years is accounted for. 
-  Here, it is treated as full agreement, in contrast to only partial agreement 
-  in the original formulation.""
+  patched and Zang updated the help file to reflect the change as:
+  "This implementation improves the original formulation inasmuch as the case
+  of neighbouring identical measurements in the same years is accounted for.
+  Here, it is treated as full agreement, in contrast to only partial agreement
+  in the original formulation."
 
 File: crn.plot.R

Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2014-12-31 08:35:50 UTC (rev 930)
+++ pkg/dplR/DESCRIPTION	2015-01-01 17:11:59 UTC (rev 931)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.2
-Date: 2014-12-31
+Date: 2015-01-01
 Authors at R: c(person("Andy", "Bunn", role = c("aut", "cph",
         "cre", "trl"), email = "andy.bunn at wwu.edu"), person("Mikko",
         "Korpela", role = c("aut", "trl")), person("Franco", "Biondi",

Modified: pkg/dplR/inst/unitTests/runit.dplR.R
===================================================================
--- pkg/dplR/inst/unitTests/runit.dplR.R	2014-12-31 08:35:50 UTC (rev 930)
+++ pkg/dplR/inst/unitTests/runit.dplR.R	2015-01-01 17:11:59 UTC (rev 931)
@@ -405,8 +405,8 @@
     checkTrue(res1$bins[nrow(res1$bins), 1] == 450,
               msg="Last bin is in correct position (test 1)")
 
-    checkIdentical(res1$bins, res2$bins,
-                   msg="Bins are identical (tests 1 and 2)")
+    checkEquals(res1$bins, res2$bins,
+                msg="Bins are the same (tests 1 and 2)")
 
     checkTrue(all(res3$bins[, 2] - res3$bins[, 1] + 1 == 100),
               msg="Bins have correct length(test 3)")
@@ -456,7 +456,14 @@
     checkEquals(c(-1, 1), range(res4$moving.rho[, "rho"], na.rm=TRUE),
                 msg="Moving correlations are as expected (test 4)")
 
-    checkIdentical(res5, res6, msg="Default method is spearman")
+    tmpNames <- names(res5)
+    checkEquals(tmpNames, names(res6),
+                msg="Result lists have the same names in the same order")
+    for (i in seq_along(res5)) {
+        checkEquals(res5[[i]], res6[[i]],
+                    msg=sprintf("Default method is spearman (%s)",
+                    tmpNames[i]))
+    }
     checkTrue(!isTRUE(all.equal(res6$overall, res7$overall)),
               msg="Overall correlation differs between methods (test 1)")
     checkTrue(!isTRUE(all.equal(res6$overall, res8$overall)),
@@ -501,8 +508,8 @@
 
     checkTrue(length(res6.2$spearman.rho) == length(res6$spearman.rho) + 2,
               msg = "Extra segments with different bin.floor")
-    checkIdentical(res6.2$spearman.rho[-c(1, 2)], res6$spearman.rho,
-                   msg = "Other segments have identical correlation")
+    checkEquals(res6.2$spearman.rho[-c(1, 2)], res6$spearman.rho,
+                msg = "Other segments have the same correlation")
 }
 
 test.ffcsaps <- function() {



More information about the Dplr-commits mailing list