style_lm: Style a Regression Model Output

Description Usage Arguments Examples

View source: R/style_lm.R

Description

Capitalize and round the result of a tidied regression. Remove the Intercept term and Statistic column, capitalize all terms and names. Round all numbers to the thousandths.

Usage

1
style_lm(tidied_lm, add_commas = FALSE)

Arguments

tidied_lm

A tidied regression summary.

add_commas

Should commas be added to numbers >= 1000?

Examples

1
2
3
4
5
6
iris_lm <- lm(Sepal.Width ~ Sepal.Length, data = iris) %>%
  summary() %>%
  purrr::pluck("coefficients") %>%
  broom::fix_data_frame()
iris_lm[2, 3] <- 1234567
style_lm(iris_lm, add_commas = TRUE)

aedobbyn/dobtools documentation built on May 28, 2019, 2:33 a.m.