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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 29 09:51:32 CEST 2013


Author: jarioksa
Date: 2013-06-29 09:51:31 +0200 (Sat, 29 Jun 2013)
New Revision: 2539

Modified:
   pkg/vegan/R/stressplot.R
   pkg/vegan/inst/ChangeLog
Log:
return plotting structures in input order from stressplot.monoMDS

Modified: pkg/vegan/R/stressplot.R
===================================================================
--- pkg/vegan/R/stressplot.R	2013-06-27 09:15:00 UTC (rev 2538)
+++ pkg/vegan/R/stressplot.R	2013-06-29 07:51:31 UTC (rev 2539)
@@ -67,7 +67,9 @@
     lab2 <- bquote("Linear fit, " * R^2 == .(Ral))
     text(min(x), 0.95*max(y), lab1, pos=4)
     text(min(x), 0.95*max(y) - strheight(lab1), lab2, pos=4)
-    invisible(list("x" = x, "y" = y, "yf" = yf))
+    ## we want to have invisible return lists in the input order
+    o <- order(object$jidx, object$iidx)
+    invisible(list("x" = x[o], "y" = y[o], "yf" = yf[o]))
 }
     
 `stressplot.default` <-

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2013-06-27 09:15:00 UTC (rev 2538)
+++ pkg/vegan/inst/ChangeLog	2013-06-29 07:51:31 UTC (rev 2539)
@@ -45,7 +45,9 @@
         R workflow (it plays nicely with `layout()` for example.
 
 	* stressplot: metaMDS and monoMDS stressplot() use now
-	expression(R^2) instead of ascii R2. 
+	expression(R^2) instead of ascii R2.  The stressplot.monoMDS()
+	function returns the plotting structures in the original input
+	order.  
 
 Version 2.1-30 (opened May 5, 2013)
 



More information about the Vegan-commits mailing list