Fit a linear model and plot
my_lm(tab, var, metadata = NULL, smooth_param = list(), facet = TRUE, ...)
your dataframe
which colname choose for var or a vector
the dataframe contains the var
parameters parse to geom_smooth
whether facet?
parameters parse to geom_point
a ggplot
# \donttest{
if (requireNamespace("ggpmisc")) {
my_lm(runif(50), var = 1:50)
my_lm(c(1:50) + runif(50, 0, 5), var = 1:50)
}
#> Loading required namespace: ggpmisc
# }