Message-ID: <m0xDzzX-000hrZC@franz.stat.wisc.edu>
Date: 1997-09-24T22:33:07Z
From: Douglas Bates
Subject: R-alpha: boxplot(..., varwidth = TRUE, ...) - Take 2
This piece of code may do a better job in bxp
if (!is.null(width)) {
if (length(width) != n | any(is.na(width)) |
any(width <= 0))
stop("invalid boxplot widths")
width <- 0.8 * width/max(width)
}
else if (varwidth) {
width <- 0.8 * sqrt(unlist(lapply(z, "[[", "n"))/nmax)
}
else if (n == 1) {
width <- 0.4
}
else width <- rep(0.8, n)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-