ustemps=read.table("...\\UStemp.txt",header=TRUE) attach(ustemps) ustemps #to compute the correlation coefficient between temperature and latitude: cor(temp,lat) #to draw a scatterplot of the temperature agains latitude: plot(lat,temp) #to estimate the simple linear regression line lm(temp~lat) #to plot points of several characters on the same graph, use the function "points" as follows: plot(lat,temp)#--->plots all temps agains latitude points(lat[1:3],temp[1:3],pch=20,col=2)#--->plots the first three points in the data set in red #to plot regression line on the graph, use the function abline #where a is the intercept, and b is the slope abline(a= 108.728,b=-2.110,col=4) #draw line in blue