# all pairwise plot of the dental data using the R function # pairs() # read in the data thedat <- scan("dentcenter.dat") thedat <- matrix(thedat,ncol=5,byrow=T) agelabs <- c("Age 8", "Age 10", "Age 12", "Age 14") # get the subsets for each gender girls <- thedat[thedat[,1]==0,2:5] boys <- thedat[thedat[,1]==1,2:5] postscript("girlscatter.ps",width=8) pairs(girls,label=agelabs,oma=c(5,0,5,0),main="Girls") graphics.off() postscript("boyscatter.ps",width=8) pairs(boys,label=agelabs,oma=c(5,0,5,0),main="Boys") graphics.off()