Advertisement
Guest User

Untitled

a guest
May 6th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. set.seed(1)
  2. dat <- data.frame( xx=sample(10,9),
  3. yy=sample(20,9),
  4. group=c('A','B', 'C') )
  5.  
  6. ggplot(dat, aes(x=group, y=yy, fill=group)) + geom_boxplot()
  7. ggplot(dat, aes(x=group, y=xx, fill=group)) + geom_boxplot() + coord_flip()
  8.  
  9. datPlot <- melt(dat)
  10. ggplot(datPlot, aes(x=group, y=value, fill=variable)) + geom_boxplot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement