[Vegan-commits] r2703 - in pkg/permute: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 12 21:25:29 CET 2013


Author: gsimpson
Date: 2013-11-12 21:25:29 +0100 (Tue, 12 Nov 2013)
New Revision: 2703

Modified:
   pkg/permute/R/check.R
   pkg/permute/inst/ChangeLog
Log:
'check' no longer calls itself via 'allPerms' during checking

Modified: pkg/permute/R/check.R
===================================================================
--- pkg/permute/R/check.R	2013-11-12 20:22:59 UTC (rev 2702)
+++ pkg/permute/R/check.R	2013-11-12 20:25:29 UTC (rev 2703)
@@ -68,9 +68,10 @@
     ## check if number requested permutations exceeds max possible
     if(getNperm(control) > num.pos) {
         control <- update(control, nperm = num.pos, maxperm = num.pos,
-                               complete = TRUE)
+                          complete = TRUE)
         control$call[["nperm"]] <- eval(control$call[["nperm"]])
         control$call[["maxperm"]] <- eval(control$call[["maxperm"]])
+        message("Requested number of permutations larger than entire set of possible permutations.\nReseting 'nperm' to number of permutations in entire set.")
     }
 
     ## if number of possible perms < minperm turn on complete enumeration
@@ -79,11 +80,12 @@
                                complete = TRUE)
         control$call[["nperm"]] <- eval(control$call[["nperm"]])
         control$call[["maxperm"]] <- eval(control$call[["maxperm"]])
+        message("Number of permutations possible is less than 'minperm'.\nTurning on complete enumeration via 'complete = TRUE'. See '?how' for details.")
     }
 
     ## if complete enumeration, generate all permutations
     if(getComplete(control) && getMake(control)) {
-        ap <- allPerms(N, control = control)
+        ap <- allPerms(N, control = control, check = FALSE)
         control <- update(control, all.perms = ap)
         control$call[["all.perms"]] <- eval(control$call[["all.perms"]])
     }

Modified: pkg/permute/inst/ChangeLog
===================================================================
--- pkg/permute/inst/ChangeLog	2013-11-12 20:22:59 UTC (rev 2702)
+++ pkg/permute/inst/ChangeLog	2013-11-12 20:25:29 UTC (rev 2703)
@@ -29,6 +29,11 @@
 	`"how"` object. The latter notifies the user that the entire set of
 	permutations is being generated.
 
+	* check: following the change to `allPerms` (see above), `check()` no
+	longer results in it calling itself, via `allPerms()`, when generating
+	the set of possible permutations if the check heuristics indicate it
+	should be.
+
 Version 0.7-6
 
 	* summary.allPerms: Was printing two slightly different subtitles.



More information about the Vegan-commits mailing list