[Vegan-commits] r2712 - pkg/permute/inst/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 18 20:52:40 CET 2013


Author: gsimpson
Date: 2013-11-18 20:52:40 +0100 (Mon, 18 Nov 2013)
New Revision: 2712

Modified:
   pkg/permute/inst/tests/test-shuffleSet.R
Log:
rep_len only introduced in R 3.0.0, switch to older rep(..., length.out = )

Modified: pkg/permute/inst/tests/test-shuffleSet.R
===================================================================
--- pkg/permute/inst/tests/test-shuffleSet.R	2013-11-18 12:09:22 UTC (rev 2711)
+++ pkg/permute/inst/tests/test-shuffleSet.R	2013-11-18 19:52:40 UTC (rev 2712)
@@ -12,7 +12,7 @@
     gr <- factor(rep(1:2, length=20))
     ctrl <- how(nperm=5, blocks=gr)
     p <- shuffleSet(20, control = ctrl) %% 2
-    y <- rep_len(c(1L, 0L), ncol(p))
+    y <- rep(c(1L, 0L), length.out = ncol(p))
     nc <- ncol(p)
     for (i in seq_len(nrow(p))) {
         expect_that(p[i, ], equals(y))



More information about the Vegan-commits mailing list