[Vegan-commits] r2698 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Nov 11 11:37:56 CET 2013
Author: jarioksa
Date: 2013-11-11 11:37:56 +0100 (Mon, 11 Nov 2013)
New Revision: 2698
Modified:
pkg/vegan/R/anova.ccalist.R
Log:
*First* calculate F-values, only *then* evaluate their P-values
Modified: pkg/vegan/R/anova.ccalist.R
===================================================================
--- pkg/vegan/R/anova.ccalist.R 2013-11-10 16:06:53 UTC (rev 2697)
+++ pkg/vegan/R/anova.ccalist.R 2013-11-11 10:37:56 UTC (rev 2698)
@@ -65,10 +65,10 @@
## dropped to vector?
if (!is.matrix(pfvals))
pfvals <- matrix(pfvals, nrow=1, ncol=nperm)
+ pfvals <- sweep(pfvals, 1, df, "/")
+ pfvals <- sweep(pfvals, 2, pscale, "/")
pval <- rowSums(sweep(pfvals, 1, fval, ">="))
pval <- (pval + 1)/(nperm+1)
- pfvals <- sweep(pfvals, 1, df, "/")
- pfvals <- sweep(pfvals, 2, pscale, "/")
## collect table
table <- data.frame(resdf, resdev, c(NA, df),
c(NA,changedev), c(NA,fval), c(NA,pval))
More information about the Vegan-commits
mailing list