View source: R/save_functions.R
save_table | R Documentation |
Saves a gtsummary table as a Word, PDF, or HTML file
save_table(tbl, filename = "table", format = c("docx", "pdf", "html"))
tbl |
A gtsummary object (e.g., tbl_regression(), tbl_summary()). |
filename |
File name to save the output. Extension is optional. |
format |
Output format. One of "docx", "pdf", or "html". |
Saves the file to a temporary directory (if no path is given). Does not return an object.
model <- glm(mpg ~ hp + wt, data = mtcars)
tbl <- gtsummary::tbl_regression(model)
save_table(tbl, filename = file.path(tempdir(), "regression_table"), format = "docx")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.