[Vegan-commits] r2225 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 19 15:57:53 CEST 2012
Author: gsimpson
Date: 2012-06-19 15:57:52 +0200 (Tue, 19 Jun 2012)
New Revision: 2225
Modified:
pkg/vegan/R/biplot.rda.R
pkg/vegan/inst/ChangeLog
Log:
correct length of 'type' if not supplied by user in biplot.rda
Modified: pkg/vegan/R/biplot.rda.R
===================================================================
--- pkg/vegan/R/biplot.rda.R 2012-06-18 12:48:02 UTC (rev 2224)
+++ pkg/vegan/R/biplot.rda.R 2012-06-19 13:57:52 UTC (rev 2225)
@@ -23,18 +23,18 @@
if (missing(type)) {
nitlimit <- 80
nit <- max(nrow(g$species), nrow(g$sites))
- if (nit > nitlimit)
- type <- "points"
- else type <- "text"
+ if (nit > nitlimit)
+ type <- rep("points", 2)
+ else type <- rep("text", 2)
}
else type <- match.arg(type, TYPES, several.ok = TRUE)
if(length(type) < 2)
type <- rep(type, 2)
- if (missing(xlim))
+ if (missing(xlim))
xlim <- range(g$species[, 1], g$sites[, 1])
- if (missing(ylim))
+ if (missing(ylim))
ylim <- range(g$species[, 2], g$sites[, 2])
- plot(g[[1]], xlim = xlim, ylim = ylim, type = "n", asp = 1,
+ plot(g[[1]], xlim = xlim, ylim = ylim, type = "n", asp = 1,
...)
abline(h = 0, lty = 3)
abline(v = 0, lty = 3)
@@ -51,9 +51,9 @@
col = col[2], cex = 0.7)
}
if (!is.null(g$sites)) {
- if (type[2] == "text")
+ if (type[2] == "text")
text(g$sites, rownames(g$sites), cex = 0.7, col = col[1])
- else if (type[2] == "points")
+ else if (type[2] == "points")
points(g$sites, pch = 1, cex = 0.7, col = col[1])
}
class(g) <- "ordiplot"
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2012-06-18 12:48:02 UTC (rev 2224)
+++ pkg/vegan/inst/ChangeLog 2012-06-19 13:57:52 UTC (rev 2225)
@@ -6,6 +6,9 @@
* New version opened with the CRAN release of vegan 2.0-4 on June
18, 2012.
+
+ * biplot.rda: bug in specification of `type` argument if not supplied
+ by the user; should have been a vector of length == 2.
Version 2.1-16 (closed June 18, 2012)
More information about the Vegan-commits
mailing list