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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 7 10:25:53 CEST 2009


Author: jarioksa
Date: 2009-10-07 10:25:51 +0200 (Wed, 07 Oct 2009)
New Revision: 1037

Modified:
   pkg/vegan/R/ordiParseFormula.R
   pkg/vegan/inst/ChangeLog
Log:
Interaction term was not analyses in cca(varespec ~ Al:P + Condition(Al + P))

Modified: pkg/vegan/R/ordiParseFormula.R
===================================================================
--- pkg/vegan/R/ordiParseFormula.R	2009-10-07 07:06:36 UTC (rev 1036)
+++ pkg/vegan/R/ordiParseFormula.R	2009-10-07 08:25:51 UTC (rev 1037)
@@ -74,10 +74,12 @@
         if (any(colnames(Z) == "(Intercept)"))
             Z <- Z[, -which(colnames(Z) == "(Intercept)"), drop = FALSE]
     }
-    if ((NCOL(mf) - ncond) > 0 && NROW(mf) > 0) {
+    if (NROW(mf) > 0) {
         Y <- model.matrix(formula, mf)
         if (any(colnames(Y) == "(Intercept)"))
             Y <- Y[, -which(colnames(Y) == "(Intercept)"), drop = FALSE]
+        if (NCOL(Y) == 0)
+            Y <- NULL
     }
     X <- as.matrix(X)
     rownames(X) <- rownames(X, do.NULL = FALSE)

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-10-07 07:06:36 UTC (rev 1036)
+++ pkg/vegan/inst/ChangeLog	2009-10-07 08:25:51 UTC (rev 1037)
@@ -4,6 +4,11 @@
 
 Version 1.16-31 (opened October 3, 2009)
 
+	* constrained ordination (cca, rda, capscale) did not analyse
+	constrained component in model like cca(varespec ~ Al:P +
+	Condition(Al + P)) or in constrained interaction terms if the
+	corresponding main effects were partialled out.
+
 	* constrained ordination (cca, rda, capscale) failed if they only
 	had partial term Condition() without constraints.
 



More information about the Vegan-commits mailing list