my_lm: Fit a linear model and plot

my_lmR Documentation

Fit a linear model and plot

Description

Fit a linear model and plot

Usage

my_lm(tab, var, metadata = NULL, smooth_param = list(), facet = TRUE, ...)

Arguments

tab

your dataframe

var

which colname choose for var or a vector

metadata

the dataframe contains the var

smooth_param

parameters parse to geom_smooth

facet

whether facet?

...

parameters parse to geom_point

Value

a ggplot

Examples


if (requireNamespace("ggpmisc")) {
  my_lm(runif(50), var = 1:50)
  my_lm(c(1:50) + runif(50, 0, 5), var = 1:50)
}


pcutils documentation built on June 26, 2024, 1:06 a.m.