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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 11 12:47:46 CET 2012


Author: jarioksa
Date: 2012-01-11 12:47:44 +0100 (Wed, 11 Jan 2012)
New Revision: 2043

Modified:
   pkg/vegan/R/anova.ccabymargin.R
   pkg/vegan/inst/ChangeLog
Log:
anova.ccabymargin failed if all marginal effects were zero

Modified: pkg/vegan/R/anova.ccabymargin.R
===================================================================
--- pkg/vegan/R/anova.ccabymargin.R	2012-01-09 19:21:20 UTC (rev 2042)
+++ pkg/vegan/R/anova.ccabymargin.R	2012-01-11 11:47:44 UTC (rev 2043)
@@ -41,7 +41,8 @@
         assign(".Random.seed", seed, envir = .GlobalEnv)
     }
     ## Put RNG at the end of the longest simulation
-    assign(".Random.seed", bigseed, envir = .GlobalEnv)
+    if (bigperm > 0)
+        assign(".Random.seed", bigseed, envir = .GlobalEnv)
     rownames(sol)[1:ntrms] <- trms
     head <- attr(sol, "heading")
     head[1] <- paste(head[1], "Marginal effects of terms\n", sep="")

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-01-09 19:21:20 UTC (rev 2042)
+++ pkg/vegan/inst/ChangeLog	2012-01-11 11:47:44 UTC (rev 2043)
@@ -13,6 +13,15 @@
 	_R_CHECK_FORCE_SUGGESTS_=FALSE (see, e.g., discussion
 	https://stat.ethz.ch/pipermail/r-devel/2011-December/062827.html).
 
+	* anova.ccabymargin failed if none of the terms was analysed (all
+	were aliased) and no permutations were performed.  This would
+	happen with, e.g.,
+	
+	A <- dune.env$Management
+	anova(rda(dune ~  Management + A, dune.env), by = "margin")
+
+	or in general if all marginal effects were aliased. 
+
 Version 2.1-8 (closed January 8, 2012)
 
 	* betadisper: failed with an error in internal function



More information about the Vegan-commits mailing list