[Vegan-commits] r493 - in pkg: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 5 14:24:41 CEST 2008


Author: jarioksa
Date: 2008-09-05 14:24:41 +0200 (Fri, 05 Sep 2008)
New Revision: 493

Modified:
   pkg/R/ordiplot.R
   pkg/inst/ChangeLog
Log:
ordiplot: partial matching of display args

Modified: pkg/R/ordiplot.R
===================================================================
--- pkg/R/ordiplot.R	2008-09-05 12:14:54 UTC (rev 492)
+++ pkg/R/ordiplot.R	2008-09-05 12:24:41 UTC (rev 493)
@@ -12,10 +12,17 @@
     }
     else {
         type <- match.arg(type, c("points", "text", "none"))
+        ## Matching displays could be done better (see
+        ## ordipointlabel), but this may not be yet broken, so...
+        dplays <- c("sites", "species")
+        if (missing(display))
+            display <- dplays
+        else
+            display <- match.arg(display, dplays, several.ok = TRUE)
         X <- Y <- NULL
-        if (missing(display) || "sites" %in% display) 
+        if ("sites" %in% display) 
             X <- scores(ord, choices = choices, display = "sites")
-        if (missing(display) || "species" %in% display) {
+        if ("species" %in% display) {
             options(show.error.messages = FALSE)
             Y <- try(scores(ord, choices = choices, display = "species"))
             options(show.error.messages = TRUE)

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2008-09-05 12:14:54 UTC (rev 492)
+++ pkg/inst/ChangeLog	2008-09-05 12:24:41 UTC (rev 493)
@@ -12,6 +12,8 @@
 	CANOCO (but permutation of CCA residuals differs from CANOCO). For
 	compatibility with old versions of vegan, you must set model =
 	"direct" explicitly.
+
+	* ordiplot: did not use partial match for "sites" and "species".
 	
 Version 1.14-10 (closed September 5, 2008)
 



More information about the Vegan-commits mailing list