sum_lm | R Documentation |
This function translates the output of summary(lm()) into a format that can be used with piping,
such as dat |> filter(some_var) |> sum_lm()
or dat |> split(~some_var) |> map(sum_lm)
,
presenting the results in an easily transcribable table.
sum_lm(dataset, y = NULL, x = NULL, coefs_only = TRUE, dgts = 5)
dataset |
The dataset to be used for regression analysis. |
y |
The response variable in the linear model. |
x |
The predictor variable in the linear model. |
coefs_only |
Logical, indicating whether to display only the coefficients table (default: TRUE). |
dgts |
Number of digits for rounding coefficients (default: 5). |
If coefs_only is TRUE, returns a rounded coefficients table; otherwise, returns the full summary.
dat
is the default dataset name, but you can put in whatever
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.