library("tinyplot")
= lm(mpg ~ hp, data = mtcars)
mod = mtcars$mpg
y = predict(mod)
yhat tinyplot(y, yhat, xlim = c(0, 40), ylim = c(0, 40))
tinyplot_add(type = type_abline(a = 0, b = 1))
Add straight lines to a plot
Description
Add straight lines to a plot
Usage
type_abline(a = 0, b = 1)
Arguments
a , b
|
the intercept and slope, single values. |