Description Usage Arguments Examples
View source: R/ggplot_functions.R
Adding model equation to ggplot. Wrapper around ggpmisc::stat_poly_eq() with standard options for label
1 | geom_equation(formula = y ~ x, ...)
|
formula |
Model formula |
... |
Further parameters passed on to ggpmisc::stat_poly_eq() one of index or name. |
1 2 3 4 5 | my_formula <- y~x
ggplot(data, aes(x, y)) +
geom_point() +
geom_smooth(method = 'lm', formula = my_formula) +
geom_equation(formula = my_formula)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.