# # Epage 37 # # 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. # #----- # size and price area = c(694, 905, 802, 1366, 716, 963, 821, 714, 1018, 887, 790, 696, 771, 1006, 1191) price = c(192.0, 215.0, 215.0, 274.0, 112.7, 185.0, 212.0, 220.0, 276.0, 260.0, 221.5, 255.0, 260.0, 293.0, 375.0) PriceDataFrame = data.frame( area=area, sale.price=price ) # Part (a): #postscript("../../WriteUp/Graphics/Chapter1/prob_1_plot.eps", onefile=FALSE, horizontal=FALSE) plot( sale.price ~ area, data= PriceDataFrame, pch=16, xlab="area", ylab="sale price" ) #dev.off() #postscript("../../WriteUp/Graphics/Chapter1/prob_1_hist.eps", onefile=FALSE, horizontal=FALSE) hist( price ) #dev.off() # Part (c): #postscript("../../WriteUp/Graphics/Chapter1/prob_1_log_plot.eps", onefile=FALSE, horizontal=FALSE) plot( log(sale.price) ~ area, data= PriceDataFrame, pch=16, xlab="area", ylab="log(sale price)" ) #dev.off() #postscript("../../WriteUp/Graphics/Chapter1/prob_1_log_hist.eps", onefile=FALSE, horizontal=FALSE) hist( log(price) ) #dev.off()