x=c(2,3,4,5,6,10)

y=c(4,8,12,14,18,22)

plot(x,y,
     xlab="X cordinates",
     ylab="Y cordinates")
     
lm.res=lm(y~x)
abline(lm.res)

plot of chunk unnamed-chunk-1