Skip to content
Prev 280115 / 398506 Next

Boxplot of multiple vectors with different lengths

On 2011-12-12 15:14, Ryan Utz wrote:
I thought that Bert had given you the answer; try this:

   aa <- runif(15)
   bb <- rnorm(30)
   cc <- rnorm(50,sd=2)
   z <- c(aa,bb,cc)
   g <- rep(LETTERS[1:3],c(length(aa),length(bb),length(cc)))
   boxplot(z ~ g)


Peter Ehlers