[Vegan-commits] r2635 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 14 13:24:54 CEST 2013
Author: jarioksa
Date: 2013-10-14 13:24:53 +0200 (Mon, 14 Oct 2013)
New Revision: 2635
Modified:
pkg/vegan/R/permutest.ccalist.R
Log:
permutest.ccalist also accepts a null model with no constraints for comparison
Modified: pkg/vegan/R/permutest.ccalist.R
===================================================================
--- pkg/vegan/R/permutest.ccalist.R 2013-10-14 11:24:09 UTC (rev 2634)
+++ pkg/vegan/R/permutest.ccalist.R 2013-10-14 11:24:53 UTC (rev 2635)
@@ -50,6 +50,8 @@
pscale <- mods[[big]]$den/resdf[big]
## Numerator of F
pfvals <- sapply(mods, function(z) z$num)
+ if (is.list(pfvals))
+ pfvals <- do.call(cbind, pfvals)
pfvals <- apply(pfvals, 1, diff)
## dropped to vector?
if (!is.matrix(pfvals))
@@ -66,7 +68,7 @@
## Collect header information
formulae <- sapply(x, function(z) deparse(formula(z)))
head <- paste0("Permutation tests for ", x[[1]]$method, " under ",
- mods[[1]]$model, " model\nwith ", nperm,
+ mods[[big]]$model, " model\nwith ", nperm,
" permutations\n")
topnote <- paste("Model ", format(1L:nmodels), ": ", formulae,
sep = "", collapse = "\n")
More information about the Vegan-commits
mailing list