sum_lm: Print Core Results from summary(lm()) in a Neat Table

View source: R/sum_lm.R

sum_lmR Documentation

Print Core Results from summary(lm()) in a Neat Table

Description

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.

Usage

sum_lm(dataset, y = NULL, x = NULL, coefs_only = TRUE, dgts = 5)

Arguments

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).

Value

If coefs_only is TRUE, returns a rounded coefficients table; otherwise, returns the full summary.

Note

dat is the default dataset name, but you can put in whatever


setgree/PrejMetaFunctions documentation built on April 28, 2024, 9:29 a.m.