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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 25 11:37:03 CEST 2010


Author: jarioksa
Date: 2010-08-25 11:37:03 +0200 (Wed, 25 Aug 2010)
New Revision: 1281

Modified:
   pkg/vegan/R/anova.ccanull.R
   pkg/vegan/inst/ChangeLog
Log:
correct DF in anova.ccanull

Modified: pkg/vegan/R/anova.ccanull.R
===================================================================
--- pkg/vegan/R/anova.ccanull.R	2010-08-25 09:22:56 UTC (rev 1280)
+++ pkg/vegan/R/anova.ccanull.R	2010-08-25 09:37:03 UTC (rev 1281)
@@ -6,12 +6,12 @@
 {
     table <- matrix(0, nrow = 2, ncol = 5)
     if (is.null(object$CA)) {
-        table[1,] <- c(object$CCA$rank, object$CCA$tot.chi, NA, 0, NA)
+        table[1,] <- c(object$CCA$qrank, object$CCA$tot.chi, NA, 0, NA)
         table[2,] <- c(0,0,NA,NA,NA)
     }
     else {
         table[1,] <- c(0,0,0,0,NA)
-        table[2,] <- c(object$CA$rank, object$CA$tot.chi, NA, NA, NA)
+        table[2,] <- c(nrow(object$CA$u) - 1, object$CA$tot.chi, NA, NA, NA)
     }
     rownames(table) <- c("Model", "Residual")
     colnames(table) <-  c("Df",
@@ -19,11 +19,11 @@
                           "F", "N.Perm", "Pr(>F)")
     table <- as.data.frame(table)
     if (is.null(object$CA))
-        head <- "No residual component"
+        head <- "No residual component\n"
     else if (is.null(object$CCA))
-        head <- "No constrained component"
+        head <- "No constrained component\n"
     else
-        head <- c("!!!!! ERROR !!!!!")
+        head <- c("!!!!! ERROR !!!!!\n")
     head <- c(head, paste("Model:", c(object$call)))
     seed <- get(".Random.seed", envir = .GlobalEnv, inherits = FALSE)
     structure(table, heading = head, Random.seed = seed,

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-08-25 09:22:56 UTC (rev 1280)
+++ pkg/vegan/inst/ChangeLog	2010-08-25 09:37:03 UTC (rev 1281)
@@ -20,6 +20,9 @@
 	instead of the call of the ordination which is now saved in
 	'testcall'.  This means that update() works now.
 
+	* anova.cca: use correct degrees of freedom when there is no
+	constrained or no residual component.
+
 	* anova.ccalist: Started to work on the concept of permutation
 	test comparison of several cca/ rda/ capscale models. The basic
 	function was added to the R-Forge (undocumented!).  First idea is



More information about the Vegan-commits mailing list