[Vegan-commits] r2724 - pkg/permute/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 21 17:33:48 CET 2013


Author: gsimpson
Date: 2013-11-21 17:33:47 +0100 (Thu, 21 Nov 2013)
New Revision: 2724

Modified:
   pkg/permute/R/allStrata.R
Log:
small tweak to simplify some code whilst getting the update() and set-methods to work

Modified: pkg/permute/R/allStrata.R
===================================================================
--- pkg/permute/R/allStrata.R	2013-11-21 16:30:03 UTC (rev 2723)
+++ pkg/permute/R/allStrata.R	2013-11-21 16:33:47 UTC (rev 2724)
@@ -7,8 +7,8 @@
     lev <- length(levels(strata))
     ## compute nperms on number of levels - for this need Within()
     ## and type == typeP
-    newControl <-
-        how(within = Within(type = getType(control, which = "plots")))
+    type <- getType(control, which = "plots")
+    newControl <- how(within = Within(type = type))
     nperms <- numPerms(lev, newControl)
     ## result object
     X <- matrix(nrow = nperms, ncol = length(strata))



More information about the Vegan-commits mailing list