I have a sample dataset here:
data = data.frame(Region = c(rep("Upper",50), rep("Lower", 50)),
Weight = c(rnorm(50, 2, 1), rnorm(50, 4, 1)))
I want to create a histogram in ggplot which the mean of each histogram overlaid with a red line.
ggplot(data=data, aes(x=Weight))+geom_histogram()+geom_vline(xintercept=mean(Weight), col="red")+facet_grid(Region~.)