[Vegan-commits] r657 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 14 14:58:49 CET 2009


Author: jarioksa
Date: 2009-01-14 14:58:49 +0100 (Wed, 14 Jan 2009)
New Revision: 657

Modified:
   pkg/vegan/R/print.summary.cca.R
   pkg/vegan/R/summary.cca.R
Log:
summary.cca: cleaner output of unconstrained models (pca)

Modified: pkg/vegan/R/print.summary.cca.R
===================================================================
--- pkg/vegan/R/print.summary.cca.R	2009-01-12 07:35:54 UTC (rev 656)
+++ pkg/vegan/R/print.summary.cca.R	2009-01-14 13:58:49 UTC (rev 657)
@@ -25,8 +25,10 @@
     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, ...)
-    cat("\nAccumulated constrained eigenvalues\n")
-    print(x$cca.acc, digits = digits, ...)
+    if (!is.null(x$cca.acc)) {
+        cat("\nAccumulated constrained eigenvalues\n")
+        print(x$cca.acc, digits = digits, ...)
+    }
     cat("\nScaling", x$scaling, "for species and site scores\n")
     if (abs(x$scaling) == 2) {
         ev.ent <- "Species"

Modified: pkg/vegan/R/summary.cca.R
===================================================================
--- pkg/vegan/R/summary.cca.R	2009-01-12 07:35:54 UTC (rev 656)
+++ pkg/vegan/R/summary.cca.R	2009-01-14 13:58:49 UTC (rev 657)
@@ -28,10 +28,12 @@
     ev.account <- summ$tot.chi
     if (!is.null(object$pCCA)) 
         ev.account <- ev.account - summ$partial.chi
-    summ$ev.con.account <- cumsum(summ$ev.con)/ev.account
+    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
-    summ$cca.acc <- cumsum(summ$ev.con)/summ$constr.chi
+    if (!is.null(object$CCA))
+        summ$cca.acc <- cumsum(summ$ev.con)/summ$constr.chi
     summ$ev.head <- c(summ$ev.con, summ$ev.uncon)[1:axes]
     summ$scaling <- scaling
     summ$digits <- digits



More information about the Vegan-commits mailing list