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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 12 16:46:07 CET 2012


Author: jarioksa
Date: 2012-12-12 16:46:07 +0100 (Wed, 12 Dec 2012)
New Revision: 2334

Modified:
   pkg/vegan/R/print.monoMDS.R
   pkg/vegan/inst/ChangeLog
Log:
scores.monoMDS handles requests to non-existing scores

Modified: pkg/vegan/R/print.monoMDS.R
===================================================================
--- pkg/vegan/R/print.monoMDS.R	2012-12-02 15:28:43 UTC (rev 2333)
+++ pkg/vegan/R/print.monoMDS.R	2012-12-12 15:46:07 UTC (rev 2334)
@@ -44,8 +44,10 @@
 {
     if (any(is.na(choices)))
         x$points
-    else
+    else {
+        choices <- choices[choices <= x$ndim]
         x$points[, choices, drop = FALSE]
+    }
 }
 
 `plot.monoMDS` <-

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-12-02 15:28:43 UTC (rev 2333)
+++ pkg/vegan/inst/ChangeLog	2012-12-12 15:46:07 UTC (rev 2334)
@@ -4,6 +4,9 @@
 
 Version 2.1-22 (opened November 19, 2012)
 
+	* monoMDS: scores() ignores now requests to scores beyond those
+	calculated instead of failing.
+
 	* nestednodf: added plot() method modelled after
 	plot.nestedtemp().
 	



More information about the Vegan-commits mailing list