[Vegan-commits] r399 - branches/1.13/R pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 5 06:30:04 CEST 2008


Author: jarioksa
Date: 2008-06-05 06:30:03 +0200 (Thu, 05 Jun 2008)
New Revision: 399

Modified:
   branches/1.13/R/print.cca.R
   pkg/R/print.cca.R
Log:
checking ranks failed when there was no CCA component

Modified: branches/1.13/R/print.cca.R
===================================================================
--- branches/1.13/R/print.cca.R	2008-06-05 04:14:16 UTC (rev 398)
+++ branches/1.13/R/print.cca.R	2008-06-05 04:30:03 UTC (rev 399)
@@ -4,7 +4,7 @@
     if (inherits(x, "pcaiv")) {
         stop("this is an ade4 object which vegan cannot handle")
     }
-    if (x$CCA$rank < x$CCA$QR$rank)
+    if (!is.null(x$CCA) && x$CCA$rank < x$CCA$QR$rank)
         warning("rank of constraints higher than the rank of dependent data\nvegan may not handle this -- wait for a bug fix release", call. = FALSE)
     cat("\nCall:\n")
     cat(deparse(x$call), "\n\n")

Modified: pkg/R/print.cca.R
===================================================================
--- pkg/R/print.cca.R	2008-06-05 04:14:16 UTC (rev 398)
+++ pkg/R/print.cca.R	2008-06-05 04:30:03 UTC (rev 399)
@@ -5,7 +5,7 @@
         warning("this is an ade4 object which vegan cannot handle")
         x <- ade2vegancca(x)
     }
-    if (x$CCA$rank < x$CCA$QR$rank)
+    if (!is.null(x$CCA) && x$CCA$rank < x$CCA$QR$rank)
         warning("rank of constraints higher than the rank of dependent data\nvegan may not handle this -- wait for a bug fix release", call. = FALSE)
     cat("\nCall:\n")
     cat(deparse(x$call), "\n\n")



More information about the Vegan-commits mailing list