lm_eq | R Documentation |
This function allows you to output the equation as well as the adjusted R-squared, for a linear model in a ggplot.
lm_eq()
## Not run:
library(ggplot2)
cars %>%
ggplot(aes(x = speed, y = dist)) +
geom_smooth(method = "lm") +
lm_eq()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.