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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 11 13:10:43 CET 2012


Author: jarioksa
Date: 2012-01-11 13:10:42 +0100 (Wed, 11 Jan 2012)
New Revision: 2044

Modified:
   pkg/vegan/R/ordistep.R
   pkg/vegan/inst/ChangeLog
Log:
handle cases where add1/drop1 effects are completely aliased

Modified: pkg/vegan/R/ordistep.R
===================================================================
--- pkg/vegan/R/ordistep.R	2012-01-11 11:47:44 UTC (rev 2043)
+++ pkg/vegan/R/ordistep.R	2012-01-11 12:10:42 UTC (rev 2044)
@@ -53,7 +53,7 @@
                 cat("\n")
                 print(aod)
             }
-            if (aod[1,5] > Pout) {
+            if (is.na(aod[1,5]) || aod[1,5] > Pout) {
                 anotab <- rbind(anotab, aod[1,])
                 change <- rownames(aod)[1]
                 object <- eval.parent(update(object, paste("~  .", change)))
@@ -77,7 +77,7 @@
                 cat("\n")
                 print(aod)
             }
-            if (aod[1,5] <= Pin) {
+            if (!is.na(aod[1,5]) && aod[1,5] <= Pin) {
                 anotab <- rbind(anotab, aod[1,])
                 change <- rownames(aod)[1]
                 object <- eval.parent(update(object, paste( "~  .",change)))

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-01-11 11:47:44 UTC (rev 2043)
+++ pkg/vegan/inst/ChangeLog	2012-01-11 12:10:42 UTC (rev 2044)
@@ -22,6 +22,11 @@
 
 	or in general if all marginal effects were aliased. 
 
+	* ordistep: handle cases where the marginal effects for
+	adding/dropping are completely aliased. This should avoid problems
+	like that reported in
+	https://stat.ethz.ch/pipermail/r-help/2012-January/300167.html
+
 Version 2.1-8 (closed January 8, 2012)
 
 	* betadisper: failed with an error in internal function



More information about the Vegan-commits mailing list