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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 7 05:21:12 CET 2013


Author: gsimpson
Date: 2013-11-07 05:21:11 +0100 (Thu, 07 Nov 2013)
New Revision: 2662

Modified:
   pkg/permute/inst/tests/test-shuffle.R
Log:
minor fiddling

Modified: pkg/permute/inst/tests/test-shuffle.R
===================================================================
--- pkg/permute/inst/tests/test-shuffle.R	2013-11-07 04:11:03 UTC (rev 2661)
+++ pkg/permute/inst/tests/test-shuffle.R	2013-11-07 04:21:11 UTC (rev 2662)
@@ -5,7 +5,7 @@
 
 ## test no permutation
 test_that("shuffle(n) returns seq_len(n) when not permuting", {
-    ctrl <- permControl(within = Within(type = "none"))
+    ctrl <- how(within = Within(type = "none"))
 
     expect_that(shuffle(3, control = ctrl), is_identical_to(seq_len(3)))
     expect_that(shuffle(1, control = ctrl), is_identical_to(1L))
@@ -13,7 +13,7 @@
 
 ## test shuffle returns integers
 test_that("shuffle() returns integers", {
-    ctrl <- permControl(within = Within(type = "none"))
+    ctrl <- how(within = Within(type = "none"))
 
     expect_that(shuffle(4), is_a("integer"))
     expect_that(shuffle(100), is_a("integer"))
@@ -26,9 +26,9 @@
 test_that("shuffle() works for non-contigous blocks of samples", {
     ## permuting levels of Plots instead of observations
     ## non-contiguous blocks - checks that r1972 continues to work
-  Plot <- factor(rep(1:4, 5))
-  CTRL <- permControl(plots = Plots(strata = Plot, type = "free"),
-                      within = Within(type = "none"))
+    Plot <- factor(rep(1:4, 5))
+    CTRL <- how(plots = Plots(strata = Plot, type = "free"),
+                within = Within(type = "none"))
     n <- 20
     set.seed(2)
     result <- shuffle(n, CTRL)



More information about the Vegan-commits mailing list