my_lm | R Documentation |
Fit a linear model and plot
my_lm(
tab,
var,
metadata = NULL,
smooth_param = list(),
facet = TRUE,
formula_size = 2.5,
...
)
tab |
your dataframe |
var |
which colname choose for var or a vector |
metadata |
the dataframe contains the var |
smooth_param |
parameters parse to |
facet |
whether facet? |
formula_size |
formula font size, default is 2.5 |
... |
parameters parse to |
a ggplot
if (requireNamespace("ggpmisc")) {
my_lm(runif(50), var = 1:50)
my_lm(c(1:50) + runif(50, 0, 5), var = 1:50)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.