[Vegan-commits] r1156 - pkg/permute/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Feb 28 17:03:02 CET 2010
Author: gsimpson
Date: 2010-02-28 17:03:01 +0100 (Sun, 28 Feb 2010)
New Revision: 1156
Modified:
pkg/permute/R/allPerms.R
Log:
Update to method where constant = TRUE; was inserting the permutations into result incorrectly
Modified: pkg/permute/R/allPerms.R
===================================================================
--- pkg/permute/R/allPerms.R 2010-02-28 15:40:06 UTC (rev 1155)
+++ pkg/permute/R/allPerms.R 2010-02-28 16:03:01 UTC (rev 1156)
@@ -53,7 +53,8 @@
sp <- split(v, ctrl$strata)
res <- matrix(nrow = nperms, ncol = n)
for(i in seq_len(perm.wi))
- res[i,] <- t(sapply(sp, function(x) x[ord[i,]]))
+ #res[i,] <- t(sapply(sp, function(x) x[ord[i,]]))
+ res[i,] <- sapply(sp, function(x) x[ord[i,]])
} else {
## different permutations within blocks
tab <- table(ctrl$strata)
More information about the Vegan-commits
mailing list