Here is a simple solution using base graphics:
scores <- rnorm(200, mean=12, sd=2) gender <- gl(2, 50, labels=c("M","F")) opar <- par(mfrow=c(1,2)) for (g in levels(gender)) qqnorm(scores[gender==g], main=paste("Gender =", g)) par(opar)
A more elegant lattice solution, and then:
qqmath(~ scores | gender, data=data.frame(scores, gender), type=c("p", "g"))
See the online help for qqmath for a more in-depth discussion and an example of customization.
source share