#====================================================================== # Figure 12.3.R. # R script to draw scatterplot of Old Faithful data. # # Data file should have two columns: response variable to be # predicted labeled "y" and predictor variable labeled "x". # Change the R working directory to the location of the data file. #====================================================================== Geyser=read.table("old_faithful.txt",header=TRUE) # Change file name if # necessary. attach(Geyser) plot(x,y,type="p",xlab="duration of eruption (minutes)", ylab="time until next eruption (minutes)") #Scatterplot of data. detach(Geyser)