data(sat.act)
error.bars.by(sat.act,sat.act$gender)
error.bars.by(sat.act[5:6],sat.act$gender,bars=TRUE,labels=c("male","female")) #draw a barplot
error.bars.by(sat.act[5:6],sat.act$education,bars=TRUE)
error.bars.by(sat.act[5:6],sat.act$education,TRUE) #plot SAT V and SAT Q by education
Run the code above in your browser using DataLab