Simple linear regression


Code needed for these tasks

#Loading the data
data=read.csv("icecream.csv",header=T)
#scatter plot the relationship
plot(quantity~temperature,data,type="p",col="blue)
#run the regression
mod=lm(quantity~temperature,data)
#print results of the regression
summary(mod)
#make a prediction
predict(mod,newdata=data.frame(temperature=35))