[Vegan-commits] r342 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 9 14:58:18 CEST 2008


Author: jarioksa
Date: 2008-05-09 14:58:18 +0200 (Fri, 09 May 2008)
New Revision: 342

Modified:
   pkg/R/ordiTerminfo.R
Log:
cca, rda, capscale gave superfluos warnings if called cca(x ~ 1) without data=

Modified: pkg/R/ordiTerminfo.R
===================================================================
--- pkg/R/ordiTerminfo.R	2008-05-07 20:04:00 UTC (rev 341)
+++ pkg/R/ordiTerminfo.R	2008-05-09 12:58:18 UTC (rev 342)
@@ -2,9 +2,11 @@
     function(d, data)
 {
     Terms <- delete.response(d$terms.expand)
-    mf <- model.frame(formula(Terms), data)
+    if (length(attr(Terms, "term.labels")) == 0)
+        mf <- data.frame(NULL)
+    else
+        mf <- model.frame(formula(Terms), data)
     xlev <- .getXlevels(Terms, mf)
     ordered <- sapply(mf, is.ordered)
     list(terms = Terms, xlev = xlev, ordered = ordered)
 }
-



More information about the Vegan-commits mailing list