The abline function can give us a straight line from intercept 0 with slope 1 in an existing plot. We would need to pass the coefficients inside the function as abline(coef = c(0,1)). Therefore, we can use this function to add a line starting from bottom left and ending at top right. This is also called diagonal line because it joins the end points on one side with the opposite of the other side.
> plot(1:10,type="n") > abline(coef=c(0,1))