Home coloured histogram variable in rstudio
 From this linkEXCEL FILE I wrote that code library(ggplot2) manze<-manze_ZAMBELLONI manze$DAGE<-as.numeric(manze$DAGE) ggplot(manze, aes(DAGE))+ geom_histogram(col="black", aes(fill=RPRO), bins=20)+ geom_density(aes(y=50*..count..), alpha=0.2)  And got that nice histogram: So the question is: for several reasons, sometimes I prefer working with default Rstudio histograms, and I think I know how to do that, except I don't know how to colour by reproductive status, so that's what I am getting hist(manze$DAGE, breaks = 30, prob=T, col="grey") grid() lines(density(manze$DAGE), col="blue", lwd=3) axis(side=1, at=seq(0,900,50)) ` So; how to colour by reproductive status adding an order to this second syntax? Many thanks and kind regards.