[Vegan-commits] r2375 - in branches/2.0: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 15 19:26:36 CET 2013


Author: gsimpson
Date: 2013-01-15 19:26:36 +0100 (Tue, 15 Jan 2013)
New Revision: 2375

Modified:
   branches/2.0/R/orditorp.R
   branches/2.0/inst/ChangeLog
   branches/2.0/man/orditorp.Rd
Log:
merge r2374 and document

Modified: branches/2.0/R/orditorp.R
===================================================================
--- branches/2.0/R/orditorp.R	2013-01-15 18:20:36 UTC (rev 2374)
+++ branches/2.0/R/orditorp.R	2013-01-15 18:26:36 UTC (rev 2375)
@@ -1,5 +1,5 @@
 `orditorp` <-
-    function (x, display, labels, choices = c(1, 2), priority,
+    function (x, display, labels, choices = c(1, 2), priority, select,
               cex = 0.7, pcex, col = par("col"),
               pcol, pch = par("pch"), air = 1, ...)
 {
@@ -13,6 +13,11 @@
         labels <- rownames(x)
     if (missing(priority))
         priority <- rowSums((scale(x)^2))
+    if (!missing(select)) {
+        x <- .checkSelect(select, x)
+        labels <- .checkSelect(select, labels)
+        priority <- .checkSelect(select, priority)
+    }
     ## remove NA scores
     x <- x[kk,]
     priority <- priority[kk]

Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2013-01-15 18:20:36 UTC (rev 2374)
+++ branches/2.0/inst/ChangeLog	2013-01-15 18:26:36 UTC (rev 2375)
@@ -4,6 +4,7 @@
 
 Version 2.0-6 (opened October 8, 2012)
 
+	* merge 2374: orditorp gains argument select
 	* merge 2372: ordilabel uses ordiArgAbsorber when plotting
 	* merge 2369: clamtest fix and border cases.
 	* merge 2367: rectify mantel, summary.anosim print.

Modified: branches/2.0/man/orditorp.Rd
===================================================================
--- branches/2.0/man/orditorp.Rd	2013-01-15 18:20:36 UTC (rev 2374)
+++ branches/2.0/man/orditorp.Rd	2013-01-15 18:26:36 UTC (rev 2375)
@@ -11,7 +11,7 @@
 }
 \usage{
 orditorp(x, display, labels, choices = c(1, 2), priority,
-    cex = 0.7, pcex, col = par("col"), pcol,
+    select, cex = 0.7, pcex, col = par("col"), pcol,
     pch = par("pch"), air = 1, ...)
 }
 
@@ -27,6 +27,10 @@
   \item{priority}{ Text will be used for items with higher priority
     if labels overlap.  This should be vector of the same
     length as the number of items plotted.}
+  \item{select}{Items to be displayed.  This can either be a logical
+    vector which is \code{TRUE} for displayed items or a vector of indices
+    of displayed items. If a logical vector is used, it must have the
+    same length as the scores plotted.}
   \item{cex, pcex}{Text and point sizes, see \code{\link{plot.default}}..}
   \item{col, pcol}{Text and point colours, see \code{\link{plot.default}}.}
   \item{pch}{Plotting character, see \code{\link{points}}.}
@@ -72,6 +76,13 @@
 plot(mod, dis="sp", type="n")
 stems <- colSums(BCI)
 orditorp(mod, "sp", label = cnam, priority=stems, pch="+", pcol="grey")
+
+## show select in action
+take <- sample(nrow(BCI), 50)
+plot(mod, dis="sp", type="n")
+stems <- colSums(BCI)
+orditorp(mod, "sp", label = cnam, priority=stems, select = take,
+         pch="+", pcol="grey")
 }
 \keyword{ aplot }
 \keyword{ hplot }



More information about the Vegan-commits mailing list