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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun May 31 19:59:09 CEST 2009


Author: jarioksa
Date: 2009-05-31 19:59:08 +0200 (Sun, 31 May 2009)
New Revision: 845

Modified:
   pkg/vegan/R/eigenvals.R
   pkg/vegan/R/print.summary.cca.R
   pkg/vegan/R/summary.cca.R
   pkg/vegan/inst/ChangeLog
Log:
summary.cca uses summary.eigenvals

Modified: pkg/vegan/R/eigenvals.R
===================================================================
--- pkg/vegan/R/eigenvals.R	2009-05-31 15:12:12 UTC (rev 844)
+++ pkg/vegan/R/eigenvals.R	2009-05-31 17:59:08 UTC (rev 845)
@@ -51,7 +51,8 @@
        out <- x$CCA$eig
    else
        out <- c(x$CCA$eig, x$CA$eig)
-   class(out) <- c("eigenvals")
+   if (!is.null(out))
+       class(out) <- c("eigenvals")
    out
 }
 

Modified: pkg/vegan/R/print.summary.cca.R
===================================================================
--- pkg/vegan/R/print.summary.cca.R	2009-05-31 15:12:12 UTC (rev 844)
+++ pkg/vegan/R/print.summary.cca.R	2009-05-31 17:59:08 UTC (rev 845)
@@ -22,12 +22,10 @@
         cat("after removing the contribution of conditiniong variables\n")
     }
     cat("\n")
-    out <- rbind("Eig.value" = c(x$ev.con, x$ev.uncon),
-                 "Accounted" = c(x$ev.con.account, x$ev.uncon.account))
-    print(out, digits = digits, ...)
-    if (!is.null(x$cca.acc)) {
+    print(x$cont, ...)
+    if (!is.null(x$concont)) {
         cat("\nAccumulated constrained eigenvalues\n")
-        print(x$cca.acc, digits = digits, ...)
+        print(x$concont, ...)
     }
     cat("\nScaling", x$scaling, "for species and site scores\n")
     if (abs(x$scaling) == 2) {

Modified: pkg/vegan/R/summary.cca.R
===================================================================
--- pkg/vegan/R/summary.cca.R	2009-05-31 15:12:12 UTC (rev 844)
+++ pkg/vegan/R/summary.cca.R	2009-05-31 17:59:08 UTC (rev 845)
@@ -23,17 +23,8 @@
     summ$partial.chi <- object$pCCA$tot.chi
     summ$constr.chi <- object$CCA$tot.chi
     summ$unconst.chi <- object$CA$tot.chi
-    summ$ev.con <- object$CCA$eig
-    summ$ev.uncon <- object$CA$eig
-    ev.account <- summ$tot.chi
-    if (!is.null(object$pCCA)) 
-        ev.account <- ev.account - summ$partial.chi
-    if (!is.null(object$CCA))
-        summ$ev.con.account <- cumsum(summ$ev.con)/ev.account
-    summ$ev.uncon.account <-
-        (max(summ$constr.chi, 0) + cumsum(summ$ev.uncon))/ev.account
-    if (!is.null(object$CCA))
-        summ$cca.acc <- cumsum(summ$ev.con)/summ$constr.chi
+    summ$cont <- summary(eigenvals(object))
+    summ$concont <- summary(eigenvals(object, constrained = TRUE))
     summ$ev.head <- c(summ$ev.con, summ$ev.uncon)[1:axes]
     summ$scaling <- scaling
     summ$digits <- digits

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-05-31 15:12:12 UTC (rev 844)
+++ pkg/vegan/inst/ChangeLog	2009-05-31 17:59:08 UTC (rev 845)
@@ -21,6 +21,8 @@
 	'summary' of eigenvals() retrurn eigenvalues with the proportion
 	explained and cumulatitive proportion explained.
 
+	* summary.cca: uses summary.eigenvals to display eigenvalues.
+
 	* protest: observed value of test statistic is now considered as
 	one of the permutations. Default N.perm decreased to 999 to account
 	for this.



More information about the Vegan-commits mailing list