[Vegan-commits] r2103 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 22 09:05:57 CET 2012
Author: jarioksa
Date: 2012-02-22 09:05:56 +0100 (Wed, 22 Feb 2012)
New Revision: 2103
Modified:
pkg/vegan/R/simper.R
Log:
fix bug in permutation p-values in simper
Modified: pkg/vegan/R/simper.R
===================================================================
--- pkg/vegan/R/simper.R 2012-02-21 09:03:18 UTC (rev 2102)
+++ pkg/vegan/R/simper.R 2012-02-22 08:05:56 UTC (rev 2103)
@@ -53,7 +53,7 @@
}
perm.contr[ ,p] <- colMeans(contrp) * 100
}
- p <- (apply(apply(perm.contr, 2, function(x) x >= average), 1, sum) + 1) / (permutations + 1)
+ p <- (apply(apply(perm.contr, 2, function(x) x >= average), 1, sum) + 1) / (nperm + 1)
}
else {
p <- NULL
More information about the Vegan-commits
mailing list