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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 21 06:02:12 CEST 2013


Author: gsimpson
Date: 2013-06-21 06:02:11 +0200 (Fri, 21 Jun 2013)
New Revision: 2533

Modified:
   pkg/vegan/R/ordipointlabel.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/ordipointlabel.Rd
Log:
ordipointlabel now uses ordiArgAbsorber to stop warnings about non-graphical parameters

Modified: pkg/vegan/R/ordipointlabel.R
===================================================================
--- pkg/vegan/R/ordipointlabel.R	2013-06-20 19:16:48 UTC (rev 2532)
+++ pkg/vegan/R/ordipointlabel.R	2013-06-21 04:02:11 UTC (rev 2533)
@@ -88,9 +88,13 @@
     sol <- optim(par = pos, fn = fn, gr = gr, method="SANN",
                  control=list(maxit=nit))
     if (!add)
-        points(xy, pch = pch, col = col, cex=cex, ...)
+        ##points(xy, pch = pch, col = col, cex=cex, ...)
+        ordiArgAbsorber(xy, pch = pch, col = col, cex = cex, FUN = points,
+                        ...)
     lab <- xy + makeoff(sol$par, box)
-    text(lab, labels=labels, col = col, cex = cex, font = font,  ...)
+    ##text(lab, labels=labels, col = col, cex = cex, font = font,  ...)
+    ordiArgAbsorber(lab, labels=labels, col = col, cex = cex, font = font,
+                    FUN = text, ...)
     pl <- list(points = xy)
     pl$labels <- lab
     attr(pl$labels, "font") <- font

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2013-06-20 19:16:48 UTC (rev 2532)
+++ pkg/vegan/inst/ChangeLog	2013-06-21 04:02:11 UTC (rev 2533)
@@ -17,6 +17,9 @@
 	permutations and other features of the design are set via `control`
 	and function `how()` from permute.
 
+	* ordipointlabel: now uses `ordiArgAbsorber()` to stop the warnings
+	about non-graphical paramters being passed to plotting functions.
+
 Version 2.1-30 (opened May 5, 2013)
 
 	* bioenv: can now use Mahalanobis, Manhattan and Gower distances

Modified: pkg/vegan/man/ordipointlabel.Rd
===================================================================
--- pkg/vegan/man/ordipointlabel.Rd	2013-06-20 19:16:48 UTC (rev 2532)
+++ pkg/vegan/man/ordipointlabel.Rd	2013-06-21 04:02:11 UTC (rev 2533)
@@ -75,6 +75,14 @@
 data(dune)
 ord <- cca(dune)
 ordipointlabel(ord)
+
+## set scaling - should be no warnings!
+ordipointlabel(ord, scaling = 1)
+
+## plot then add
+plot(ord, scaling = 3, type = "n")
+ordipointlabel(ord, display = "species", scaling = 3, add = TRUE)
+ordipointlabel(ord, display = "sites", scaling = 3, add = TRUE)
 }
 \keyword{ hplot }
 \keyword{ aplot }



More information about the Vegan-commits mailing list