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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 3 07:53:28 CEST 2009


Author: jarioksa
Date: 2009-09-03 07:53:28 +0200 (Thu, 03 Sep 2009)
New Revision: 986

Modified:
   pkg/vegan/R/anova.ccabyaxis.R
   pkg/vegan/inst/ChangeLog
Log:
anova.cca(..., by = 'axis') works with excluded or omitted missing data (so and so)

Modified: pkg/vegan/R/anova.ccabyaxis.R
===================================================================
--- pkg/vegan/R/anova.ccabyaxis.R	2009-09-02 16:18:06 UTC (rev 985)
+++ pkg/vegan/R/anova.ccabyaxis.R	2009-09-03 05:53:28 UTC (rev 986)
@@ -8,6 +8,10 @@
     if (is.null(object$terms)) 
         stop("Analysis is only possible for models fitted using formula")
     lc <- object$CCA$u
+    ## Handle missing values in scores, both "omit" and "exclude" to
+    ## match dims with data.
+    if (!is.null(object$na.action))
+        lc <- stats:::napredict.exclude(object$na.action, lc)
     newdata <- cbind(lc, eval(as.list(object$call)$data))
     axnam <- colnames(lc)
     df <- c(rep(1, rnk), object$CA$rank)

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-09-02 16:18:06 UTC (rev 985)
+++ pkg/vegan/inst/ChangeLog	2009-09-03 05:53:28 UTC (rev 986)
@@ -12,7 +12,12 @@
 	but functions accessing the result with scores will get the NA
 	data.  
 	
-	* plot.cca: works with when there are NA values in scores.
+	* plot.cca: works when there are NA values in scores.
+
+	* anova.cca(.., by = "axis") works when there are omitted or
+	excluded observations due to missing values. However, the way the
+	missing values are handled in simulations should be checked in all
+	anova.cca models: are the missing rows permuted or not?
 	
 Version 1.16-26 (closed September 1, 2009)
 



More information about the Vegan-commits mailing list