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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 2 14:38:25 CET 2013


Author: jarioksa
Date: 2013-12-02 14:38:24 +0100 (Mon, 02 Dec 2013)
New Revision: 2793

Modified:
   pkg/vegan/R/anovacca.byterm.R
Log:
anovacca(..., by='axis', scope=) handles empty scopes (like wrong names in scope)

Modified: pkg/vegan/R/anovacca.byterm.R
===================================================================
--- pkg/vegan/R/anovacca.byterm.R	2013-12-01 17:17:05 UTC (rev 2792)
+++ pkg/vegan/R/anovacca.byterm.R	2013-12-02 13:38:24 UTC (rev 2793)
@@ -60,6 +60,8 @@
         trms <- drop.scope(object)
     trmlab <- trms[trms %in% attr(terms(object$terminfo),
                                       "term.labels")]
+    if(length(trmlab) == 0)
+        stop("the scope was empty: no available marginal terms")
     ## baseline: all terms
     big <- permutest(object, permutations, ...)
     dfbig <- big$df[2]



More information about the Vegan-commits mailing list