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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 9 19:20:43 CEST 2009


Author: jarioksa
Date: 2009-09-09 19:20:43 +0200 (Wed, 09 Sep 2009)
New Revision: 1000

Modified:
   pkg/vegan/R/cca.default.R
   pkg/vegan/R/print.cca.R
   pkg/vegan/inst/ChangeLog
Log:
cca does not warn on removed species, but prints their number

Modified: pkg/vegan/R/cca.default.R
===================================================================
--- pkg/vegan/R/cca.default.R	2009-09-09 14:54:43 UTC (rev 999)
+++ pkg/vegan/R/cca.default.R	2009-09-09 17:20:43 UTC (rev 1000)
@@ -20,7 +20,6 @@
         names(exclude.spec) <- colnames(X)[tmp]
         class(exclude.spec) <- "exclude"
         X <- X[, !tmp, drop = FALSE]
-        warning("Some species were removed because they were missing in the data")
     }
     gran.tot <- sum(X)
     X <- X/gran.tot

Modified: pkg/vegan/R/print.cca.R
===================================================================
--- pkg/vegan/R/print.cca.R	2009-09-09 14:54:43 UTC (rev 999)
+++ pkg/vegan/R/print.cca.R	2009-09-09 17:20:43 UTC (rev 1000)
@@ -20,8 +20,15 @@
     cat("Inertia is", x$inertia, "\n")
     if (!is.null(x$CCA$alias))
         cat("Some constraints were aliased because they were collinear (redundant)\n")
+    ## Report removed observations and species
     if (!is.null(x$na.action))
         cat(naprint(x$na.action), "\n")
+    sp.na <- if (is.null(x$CCA)) attr(x$CA$v, "na.action")
+    else attr(x$CCA$v, "na.action")
+    if (!is.null(sp.na))
+        cat(length(sp.na), "species",
+            ifelse(length(sp.na)==1, "(variable)", "(variables)"),
+            "deleted due to missingness\n")
     if (!is.null(x$CCA)) {
         cat("\nEigenvalues for constrained axes:\n")
         print(x$CCA$eig, digits = digits, ...)

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-09-09 14:54:43 UTC (rev 999)
+++ pkg/vegan/inst/ChangeLog	2009-09-09 17:20:43 UTC (rev 1000)
@@ -3,6 +3,9 @@
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
 Version 1.16-27 (opened September 1, 2009)
+
+	* cca & print.cca: no warning on removed species in cca.default,
+	but print information on their number.
 	
 	* predict.rda: failed when rda was based on correlations (scale =
 	TRUE), and there were missing data (0/0 division in scaling).



More information about the Vegan-commits mailing list