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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 16 19:27:07 CEST 2009


Author: jarioksa
Date: 2009-09-16 19:27:07 +0200 (Wed, 16 Sep 2009)
New Revision: 1010

Modified:
   pkg/vegan/R/plot.meandist.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/mrpp.Rd
Log:
plot.meandist got ylim argument

Modified: pkg/vegan/R/plot.meandist.R
===================================================================
--- pkg/vegan/R/plot.meandist.R	2009-09-16 17:24:29 UTC (rev 1009)
+++ pkg/vegan/R/plot.meandist.R	2009-09-16 17:27:07 UTC (rev 1010)
@@ -1,5 +1,5 @@
 `plot.meandist` <-
-    function(x, cluster = "average",  ...) 
+    function(x, cluster = "average", ylim, ...) 
 {
     n <- attr(x, "n")
     cl <- hclust(as.dist(x), method = cluster, members = n)
@@ -7,7 +7,9 @@
     w <- diag(x)[labels(cl)]
     tr <- unlist(dendrapply(cl, function(n) attr(n, "height")))
     root <- attr(cl, "height")
-    plot(cl, ylim = range(c(w, tr, root), na.rm = TRUE), leaflab = "none", ...)
+    if (missing(ylim))
+        ylim <- range(c(w, tr, root), na.rm = TRUE)
+    plot(cl, ylim = ylim, leaflab = "none", ...)
     for (i in 1:length(w)) segments(i, tr[i], i, w[i])
     pos <- ifelse(w < tr, 1, 3)
     pos[is.na(pos)] <- 1

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-09-16 17:24:29 UTC (rev 1009)
+++ pkg/vegan/inst/ChangeLog	2009-09-16 17:27:07 UTC (rev 1010)
@@ -4,6 +4,10 @@
 
 Version 1.16-29 (opened September 15, 2009)
 
+	* meandist: plot got an 'ylim' argument. This is practical when
+	users want to display several plots side by side, and requested by
+	Heli Suurkuukka.
+
 	* WARNING OF A BUG in cca, rda & capscale: all versions have
 	failed since rev 972 (Sep 1, 2009) if an argument in a model was a
 	matrix. Now these things work so that tess pass, but results are

Modified: pkg/vegan/man/mrpp.Rd
===================================================================
--- pkg/vegan/man/mrpp.Rd	2009-09-16 17:24:29 UTC (rev 1009)
+++ pkg/vegan/man/mrpp.Rd	2009-09-16 17:27:07 UTC (rev 1010)
@@ -18,7 +18,7 @@
      weight.type = 1, strata)
 meandist(dist, grouping, ...)
 \method{summary}{meandist}(object, ...)
-\method{plot}{meandist}(x, cluster = "average", ...)
+\method{plot}{meandist}(x, cluster = "average", ylim, ...)
 }
 
 \arguments{
@@ -43,6 +43,7 @@
   \item{cluster}{A clustering method for the \code{\link{hclust}}
     function. Any \code{hclust} method can be used, but perhaps only
     \code{"average"} and \code{"single"} make sense.}
+  \item{ylim}{Limits for vertical axes (optional).}
   \item{\dots}{Further arguments passed to functions.}
 }
 



More information about the Vegan-commits mailing list