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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 7 05:11:03 CET 2013


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

Modified:
   pkg/permute/R/shuffleSet2.R
Log:
can't use unsplit as each element is a matrix of permutations in shuffleSet

Modified: pkg/permute/R/shuffleSet2.R
===================================================================
--- pkg/permute/R/shuffleSet2.R	2013-11-06 17:14:29 UTC (rev 2660)
+++ pkg/permute/R/shuffleSet2.R	2013-11-07 04:11:03 UTC (rev 2661)
@@ -33,8 +33,10 @@
         for(i in seq_len(nb)) {
             out[[i]] <- doShuffleSet(spln[[i]], nset = nset, control)
         }
-        ##out <- do.call(cbind, out) ## undo the original splitting
-        out <- unsplit(out, Block) ## undo the original splitting
+        ## undo the original splitting. Can't use unsplit() here as the
+        ## elements of out are matrices
+        out <- do.call(cbind, out)
+        out[, unlist(spln)] <- out ## reorders according to spln
     } else {
         ## if we have all.perms now then we must have generated it
         ## during checking or user passed it with control



More information about the Vegan-commits mailing list