export_anova | R Documentation |
Export an ANOVA model summary as a pretty table.
export_anova(
model,
file = NULL,
par_names = NULL,
alpha = 0.05,
bold_sig = TRUE,
digits = c(1, 2, 1, 4),
align = c("l", "r", "r", "r"),
keep_tex = FALSE,
...
)
model |
A model object. |
file |
A file-path destination for your table, with extensions pdf or png. Using a value of NULL will return the LaTeX code for the table. |
par_names |
A character vector of variable names to replace the model object defaults. |
alpha |
A numeric from 0 to 1 for boldface identification of significant predictors. Default; 0.05. |
bold_sig |
A logical indicating whether to put p-values for significant predictors in bold-face type. Default: TRUE. |
digits |
An integer vector denoting the number of significant digits to print for each of the numeric table fields. Default: c(1, 2, 1, 4). |
align |
A character vector denoting alignment for each of the table fields. "l", "c", and "r" denote left, center, and right, respectively. Default: c("l", "r", "r", "r"). |
keep_tex |
A logical to save the .tex file. Default: FALSE. |
... |
Additional arguments to be passed to car::Anova, knitr::kable, and kableExtra::add_footnote. |
mod <- glm(Sepal.Length ~ Sepal.Width + Petal.Length, data = iris)
renames <- data.frame(old = c("Sepal.Width", "Petal.Length"),
new = c("Sepal Width", "Petal Length"))
file <- "test_table.pdf"
export_anova(mod = mod, file = file, par_names = renames)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.