[Vegan-commits] r1453 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 12 14:10:02 CET 2011


Author: jarioksa
Date: 2011-01-12 14:10:02 +0100 (Wed, 12 Jan 2011)
New Revision: 1453

Modified:
   pkg/vegan/R/anova.ccabyaxis.R
   pkg/vegan/inst/ChangeLog
Log:
anova.cca(..., by = axis) failed in capscale: scope again

Modified: pkg/vegan/R/anova.ccabyaxis.R
===================================================================
--- pkg/vegan/R/anova.ccabyaxis.R	2011-01-11 09:58:40 UTC (rev 1452)
+++ pkg/vegan/R/anova.ccabyaxis.R	2011-01-12 13:10:02 UTC (rev 1453)
@@ -22,7 +22,7 @@
     out <- data.frame(df, chi, Fval, nperm, Pval)
     environment(object$terms) <- environment()
     fla <- update(formula(object), . ~ lc[,1] + Condition(lc[,-1]))
-    sol <- anova(update(object, fla),  ...)
+    sol <- anova(update(object, fla, data = NULL),  ...)
     out[c(1, rnk + 1), ] <- sol
     seed <- attr(sol, "Random.seed")
     attr(out, "names") <- attr(sol, "names")
@@ -34,7 +34,7 @@
     if (rnk > 1) {
         for (.ITRM in 2:rnk) {
             fla <- update(formula(object),  .~ lc[, .ITRM] + Condition(lc[,-(.ITRM)]) )
-            sol <- update(object, fla)
+            sol <- update(object, fla, data = NULL)
             assign(".Random.seed", seed, envir = .GlobalEnv)
             out[.ITRM, ] <- as.matrix(anova(sol, ...))[1, 
                 ]

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-01-11 09:58:40 UTC (rev 1452)
+++ pkg/vegan/inst/ChangeLog	2011-01-12 13:10:02 UTC (rev 1453)
@@ -20,6 +20,12 @@
 	scale of input dissimilarities. The function uses only the real
 	axes, and imaginary dimensions are ignored.
 
+	* anova.cca: anova(..., by = "axis") failed with capscale()
+	results. Again a scoping issue, and not the only one in
+	anova.cca() cases. The fix is hasty, and I'm not sure it is
+	OK. These really should be fixed. As a starter, a test set should
+	be developed and then worked through so long that it succeeds.
+
 Version 1.18-20 (closed January 9, 2011)
 
 	* base of vegan release 1.17-6 (released on Jan 10, 2011).



More information about the Vegan-commits mailing list