[Vegan-commits] r2716 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 20 17:46:47 CET 2013


Author: jarioksa
Date: 2013-11-20 17:46:47 +0100 (Wed, 20 Nov 2013)
New Revision: 2716

Modified:
   pkg/vegan/R/anovacca.byterm.R
Log:
keep Conditions() in the null model in anovacca(..., by='term'

Modified: pkg/vegan/R/anovacca.byterm.R
===================================================================
--- pkg/vegan/R/anovacca.byterm.R	2013-11-20 16:08:43 UTC (rev 2715)
+++ pkg/vegan/R/anovacca.byterm.R	2013-11-20 16:46:47 UTC (rev 2716)
@@ -17,15 +17,16 @@
     trmlab <- trmlab[trmlab %in% attr(terms(object$terminfo),
                                       "term.labels")]
     ntrm <- length(trmlab)
-    m0 <- update(object, . ~ 1)
+    m0 <- update(object, paste(".~.-", paste(trmlab, collapse="-")))
     mods <- list(m0)
     for(i in seq_along(trmlab)) {
         fla <- paste(". ~ . + ", trmlab[i])
         mods[[i+1]] <- update(mods[[i]], fla)
     }
-    ## The result. Should be reformatted
+    ## The result
     sol <- anova.ccalist(mods, permutations = permutations,
                          model = model, parallel = parallel)
+    ## Reformat
     out <- data.frame(c(sol[-1,3], sol[ntrm+1,1]),
                       c(sol[-1,4], sol[ntrm+1,2]),
                       c(sol[-1,5], NA),



More information about the Vegan-commits mailing list