addlmeq | R Documentation |
addlmeq
produces an equation expression for a simple linear fitting to be added in a plot.
addlmeq(fit, decimal = 2)
fit |
an object of class "lm" produced by simple linear models. |
decimal |
displayed decimal places. |
An equation expression for the given simple linear fitting.
addr2
.
fit = lm(dist ~ speed, data = cars) plot(cars) abline(fit, col = 'red') title(addlmeq(fit, 2), adj = 0.1, line = -1.8, col.main = 'blue', cex.main = 1.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.