polish | R Documentation |
Wrapper around broom::tidy()
with some additional finishing touches!
polish(
x,
.labels = NULL,
.conf_int = TRUE,
.flextable = TRUE,
.header1 = NULL,
.header2 = NULL,
...
)
x |
A model object to be converted into a |
.labels |
A named list of variable labels. If NULL, current labels will be used |
.conf_int |
Logical to return a 95 percent confidence interval |
.flextable |
Logical to return a formatted flextable object if TRUE or a list of a dataframe and row numbers to use in |
.header1 |
See |
.header2 |
See |
... |
additional arguments passed to |
df1 <- tibble::tibble(
id = letters,
age = sample(seq(18, 39, 1), 26, replace = TRUE),
mile_time = sample(seq(6, 7.5, 0.1), 26, replace = TRUE),
gender = sample(c("Male", "Female"), 26, replace = TRUE),
country = sample(c("USA", "Canada", "Africa", "England"), 26, replace = TRUE)
)
lm_res <- lm(mile_time ~ age + gender + country, data = df1)
lm_res %>%
polish(
.labels = c(age = "Age", gender = "Gender", country = "Country of origin"),
.header1 = list(values = c("", "Estimate (95% CI)"))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.