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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Dec 20 10:24:30 CET 2014


Author: mvkorpel
Date: 2014-12-20 10:24:30 +0100 (Sat, 20 Dec 2014)
New Revision: 925

Modified:
   pkg/dplR/DESCRIPTION
   pkg/dplR/inst/unitTests/runit.dplR.R
Log:
Changed the expected results in the glk() unit tests to reflect the changes
made to the function.


Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2014-12-19 21:58:00 UTC (rev 924)
+++ pkg/dplR/DESCRIPTION	2014-12-20 09:24:30 UTC (rev 925)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.1
-Date: 2014-12-19
+Date: 2014-12-20
 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-19 21:58:00 UTC (rev 924)
+++ pkg/dplR/inst/unitTests/runit.dplR.R	2014-12-20 09:24:30 UTC (rev 925)
@@ -593,14 +593,14 @@
                 msg="glk() is 1 when two sequences agree about the signs of all the differences and there are no zero differences")
     checkEquals(0, glk(data.frame(seq.rand, -seq.rand))[1, 2],
                 msg="glk() is 0 when two sequences disagree about the signs of all the differences and there are no zero differences")
-    checkEquals(0, glk(data.frame(seq.step, -seq.step))[1, 2],
-                msg="glk() is 0 when two sequences agree about the location of zero differences and disagree about the signs of nonzero differences")
+    checkEquals(0.5, glk(data.frame(seq.step, -seq.step))[1, 2],
+                msg="dplR >= 1.6.1: a zero difference in both series is full agreement (here, exactly half of the cases)")
     checkEquals(0.5, glk(data.frame(seq.rand, rep(1, length(seq.rand))))[1, 2],
                 msg="glk() is 0.5 when one sequence is constant and the other only has nonzero differences")
-    checkEquals(0.5, glk(data.frame(seq.step, seq.step))[1, 2],
-                msg="glk() is 0.5 when comparing a sequence where exactly half of the differences are zero with itself")
-    checkEquals(0.25, glk(data.frame(seq.step, rep(1, length(seq.step))))[1, 2],
-                msg="glk() is 0.25 when comparing a constant sequence and a sequence where exactly half of the differences are zero")
+    checkEquals(1, glk(data.frame(seq.step, seq.step))[1, 2],
+                msg="dplR >= 1.6.1: glk() is 1 when comparing any sequence with itself")
+    checkEquals(0.75, glk(data.frame(seq.step, rep(1, length(seq.step))))[1, 2],
+                msg="dplR >= 1.6.1: glk() is 0.75 when comparing a constant sequence and a sequence where exactly half of the differences are zero")
 }
 
 test.hanning <- function() {



More information about the Dplr-commits mailing list