[Dplr-commits] r930 - in pkg/dplR: . inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 31 09:35:52 CET 2014
Author: mvkorpel
Date: 2014-12-31 09:35:50 +0100 (Wed, 31 Dec 2014)
New Revision: 930
Modified:
pkg/dplR/DESCRIPTION
pkg/dplR/inst/unitTests/runit.dplR.R
Log:
Adjusted the tests of corr.series.seg(), hoping to fix the failure on solaris-sparc.
Version 1.6.2
Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION 2014-12-23 23:12:16 UTC (rev 929)
+++ pkg/dplR/DESCRIPTION 2014-12-31 08:35:50 UTC (rev 930)
@@ -2,8 +2,8 @@
Package: dplR
Type: Package
Title: Dendrochronology Program Library in R
-Version: 1.6.1
-Date: 2014-12-23
+Version: 1.6.2
+Date: 2014-12-31
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-23 23:12:16 UTC (rev 929)
+++ pkg/dplR/inst/unitTests/runit.dplR.R 2014-12-31 08:35:50 UTC (rev 930)
@@ -476,24 +476,22 @@
checkTrue(!isTRUE(all.equal(res7$spearman.rho, res8$spearman.rho)),
msg="Segment correlations differ between methods (test 3)")
- tmp7 <- na.omit(res7$moving.rho[, "rho"])
+ tmp7 <- as.vector(na.omit(res7$moving.rho[, "rho"]))
checkTrue(length(tmp7) == 451,
msg = "Number of non-NA correlations (test 1)")
- uniqueRho7 <- unique(tmp7)
- checkTrue(length(uniqueRho7) == 1,
- msg = "Correlation when segment length matches the common cycle of rwl and series")
+ checkEquals(rep(mean(tmp7), 451), tmp7,
+ msg = "Correlation when segment length matches the common cycle of rwl and series")
tmp9 <- na.omit(res9$moving.rho[, "rho"])
checkTrue(length(tmp9) == 453,
msg = "Number of non-NA correlations (test 2)")
uniqueRho9 <- unique(tmp9)
checkTrue(length(uniqueRho9) == 50,
msg = "Correlations for rwl and series with a common cycle, shorter segments")
- tmp10 <- na.omit(res10$moving.rho[, "rho"])
+ tmp10 <- as.vector(na.omit(res10$moving.rho[, "rho"]))
checkTrue(length(tmp10) == 401,
msg = "Number of non-NA correlations (test 3)")
- uniqueRho10 <- unique(tmp10)
- checkTrue(length(uniqueRho10) == 1,
- msg = "Correlation when segment length is a multiple of the length of the common cycle of rwl and series")
+ checkEquals(rep(mean(tmp10), 401), tmp10,
+ msg = "Correlation when segment length is a multiple of the length of the common cycle of rwl and series")
tmp11 <- na.omit(res11$moving.rho[, "rho"])
checkTrue(length(tmp11) == 359,
msg = "Number of non-NA correlations (test 4)")
More information about the Dplr-commits
mailing list