Function of the difference between lines R and abline languages

Lines (), the effect is already FIG plus line, command lines (x, y), which is functionally equivalent to plot (x, y, type = "1") in
function abline () can be added in a straight line on FIG. , its use has four formats.
(1) abline (a, b )
represents a Videos y = a + bx straight line
(2) abline (h = i )
denotes draw a horizontal line y = i,
(3) abline (v = i )
denotes draw a vertical straight line x = i,
(4) abline (lm.obj)
represents a linear equation plotted linear model obtained
more detailed explanation see the abline function
lines () function is a general connection diagram made, whose input is x , y point vector.
abline () function to do regression line is, the input is the regression model objects.

Published 39 original articles · won praise 11 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_42712867/article/details/98170460