Enhancer=c(140,148,175,195,245,250,250) Population=c(55.5,55.5,64.9,67.5,69.0,72.0,75.5) Oldenburg_df=data.frame(Enhancer,Population) #This only worked because x was listed in the dataframe before y plot(Oldenburg_df) Oldenburg_SLR=lm(Population~Enhancer,data=Oldenburg_df) summary(Oldenburg_SLR) plot(Oldenburg_SLR) #Old Faithful data ?faithful plot(faithful,xlab="Duration (minutes)",ylab="Interval (minutes)") Faithful_SLR=lm(waiting~eruptions,data=faithful) summary(Faithful_SLR) plot(Faithful_SLR) anova(Faithful_SLR) confint(Faithful_SLR) plot(faithful,xlab="Duration (minutes)",ylab="Interval (minutes)") lines(faithful$eruptions,Faithful_SLR$fitted.values,col="red") write.table(faithful,"C:/Users/grego.MATHSTAT/Downloads/faithful.txt",row.names=F)