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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Oct 3 10:55:13 CEST 2009


Author: jarioksa
Date: 2009-10-03 10:55:12 +0200 (Sat, 03 Oct 2009)
New Revision: 1028

Modified:
   pkg/vegan/R/plot.decorana.R
   pkg/vegan/inst/ChangeLog
Log:
plot.decorana uses linestack if only one axis was chosen

Modified: pkg/vegan/R/plot.decorana.R
===================================================================
--- pkg/vegan/R/plot.decorana.R	2009-10-03 05:52:20 UTC (rev 1027)
+++ pkg/vegan/R/plot.decorana.R	2009-10-03 08:55:12 UTC (rev 1028)
@@ -26,6 +26,13 @@
     spenam <- rownames(x$cproj)
     sites <- sites[, choices]
     specs <- specs[, choices]
+    ## Use linestack if only one dim was specified (and exit)
+    if (NCOL(sites) == 1 && NCOL(specs) == 1) {
+        pl <- linestack(sites,
+                        ylim = range(c(sites, specs), na.rm = TRUE), ...)
+        linestack(specs, side = "left", add = TRUE, ...)
+        return(invisible(pl))
+    }
     sp.x <- range(specs[, 1])
     sp.y <- range(specs[, 2])
     st.x <- range(sites[, 1])

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-10-03 05:52:20 UTC (rev 1027)
+++ pkg/vegan/inst/ChangeLog	2009-10-03 08:55:12 UTC (rev 1028)
@@ -4,6 +4,9 @@
 
 Version 1.16-31 (opened October 3, 2009)
 
+	* plot.decorana: uses linestack() if only one dimension was
+	chosen. 
+
 	* scores.lda: new function to extract row scores and predictor
 	coefficients from "lda" objects (MASS package). Magically,
 	ordiplot() started to work with "lda" results. Not yet documented,



More information about the Vegan-commits mailing list