Add_R2 | R Documentation |
Adding R2 value for a linear regression
Add_R2(
method = "lm",
formula = y ~ x,
add_line = T,
color,
lty = "dashed",
conf_int = F,
...
)
method |
model type |
formula |
model formula |
add_line |
Should we add a |
color |
color of the |
lty |
linetype of the |
conf_int |
Should we display confindence intervals of the |
... |
Other arguments passed to |
This is a dummy workaround of the original stat_poly_eq
## Not run:
library(ggpubr)
ggplot(mtcars, aes(wt, mpg)) +
geom_point() +
labs(title = "A Lovely Plot",
subtitle = "What can the subtitle tell us?") +
Add_R2() +
theme_clean()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.