Let's consider this data:
df = data.frame('score'=round(runif(15, 1, 10)),
'group'=paste0("a",rep(c(1,2,3),each=5)),
'category'=rep(c("big", "big", "big", "big", "small"), 3))
I would like to plot boxplots of this data with ggplot2
. What i want is: boxplot(score~group), but with the boxplots arranged according to the mean of the "big" individuals of each group.
I can't figure it out in a simple way, without creating new variables. OK to use Dplyr. Thanks.