# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- library(alr3) data(wblake) attach(wblake) plot(Age,Length) abline(lm(Length~Age)) # plot the means on top of the data: uAge <- sort(unique(Age)) lines(uAge,tapply(Length,Age,mean)) # compute the sd as a function of age ... looks very much like a null plot lsd <- tapply(Length,Age,sd) plot(1:8,lstd)