ggplot2 - Multiple Boxplots from Sources of Different Lengths
问题 I have a few different vectors of varying length for which I would like to generate side by side boxplots using ggplot2. This is relatively straight forward to do with the Base plotting system. However ggplot2 only takes a single data frame as input, which is difficult to create from data of varying lengths. a <- rnorm(10) b <- rnorm(100) c <- rnorm(1000) boxplot(a, b, c) Q: What is the correct way to draw boxplots using ggplot2 using data of varying lengths? 回答1: ggplot uses tidy long data