2

HI i trying to make one bwplot (it must be bwplot from Lattice) for differnt vectors lenghts.

xx1 <- rnorm(20, mean = 3, sd = 3.6) #20
xx2 <- rpois(40, lambda = 3.5)
xx3 <- rchisq(31, df = 5, ncp = 0) #31
Garf
  • 75
  • 1
  • 12

1 Answers1

1

This is easier to do once you have created a data.frame with your three groups:

library(lattice)
df <- data.frame(x=c(xx1, xx2, xx3), group=factor(c(rep("xx1", length(xx1)), rep("xx2", length(xx2)), rep("xx3", length(xx3)))))
bwplot(x~group, df)

enter image description here

Marc in the box
  • 11,769
  • 4
  • 47
  • 97