# Plots of data in Table 1.6. Before using these commands, # the current directory must be set to where the data is, # using setwd(...). The data files are from the textbook # website (see link in course web site). I renamed them # to get rid of the .dat or .DAT. d = read.table("T1-6") colnames(d) = c("age","S1sum","S1diff","S2sum","S2diff","MS") # The following commands make various plots. Of course, if # you do them all, only the last plot will be visible on the # screen. plot (d$S1sum, d$S2sum, col=c("green","red")[d$MS+1], pch=19) plot (d[,2:5], col=c("green","red")[d$MS+1], pch=19) plot (d[d$MS==0,2:5], pch=19) plot (d[d$MS==1,2:5], pch=19)