R-alpha: boxplot(..., varwidth = TRUE, ...) - Take 2

Douglas Bates bates@stat.wisc.edu
Wed, 24 Sep 1997 17:33:07 -0500 (CDT)


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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-