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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 11 16:13:12 CET 2014


Author: jarioksa
Date: 2014-02-11 16:13:12 +0100 (Tue, 11 Feb 2014)
New Revision: 2856

Modified:
   pkg/vegan/R/add1.cca.R
   pkg/vegan/inst/ChangeLog
Log:
ordistep failed with redundant terms (Df=0) in the add scope

Modified: pkg/vegan/R/add1.cca.R
===================================================================
--- pkg/vegan/R/add1.cca.R	2014-02-10 08:40:49 UTC (rev 2855)
+++ pkg/vegan/R/add1.cca.R	2014-02-11 15:13:12 UTC (rev 2856)
@@ -32,6 +32,11 @@
         }
         colnames(adds) <- colnames(tmp)[3:4]
         out <- cbind(out, adds)
+        ## check for redundant (0 Df) terms
+        if (any(nas <- out[,1] < 1)) {
+            out[[3]][nas] <- NA
+            out[[4]][nas] <- NA
+        }
         class(out) <- cl
     }
     out

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2014-02-10 08:40:49 UTC (rev 2855)
+++ pkg/vegan/inst/ChangeLog	2014-02-11 15:13:12 UTC (rev 2856)
@@ -11,6 +11,9 @@
 	be used in an incorrect context". The dots were added in r2765,
 	and now removed.
 
+	* ordistep: add1.cca reported P=0 for redundant terms with 0 Df,
+	and this caused an error in ordistep.
+
 	* as.hclust.spantree: a new function to cast a "spantree" result
 	object to an "hclust" tree.
 



More information about the Vegan-commits mailing list