I have seen this. I have the data like:
female=c("hw","hw","uw","uw","w","w")
male=c("w","hw","uw","w")
I need to make a histogram for both male and female, so i made 2 different data.frame:
male<-data.frame(class=male)
female<-data.frame(class=female)
and then draw the hist:
library(ggplot2)
ggplot(data=male,col="green",aes(x=class))
+ geom_histogram(data=female,col="red")
but it complains with:
invalid argument to unary operator
I need to make male plot in green and female in blue.