View source: R/datasummary_df.R
datasummary_df | R Documentation |
Draw a table from a data.frame
datasummary_df(
data,
output = getOption("modelsummary_output", default = "default"),
fmt = 2,
align = getOption("modelsummary_align", default = NULL),
hrule = getOption("modelsummary_hrule", default = NULL),
title = getOption("modelsummary_title", default = NULL),
notes = getOption("modelsummary_notes", default = NULL),
add_rows = getOption("modelsummary_add_rows", default = NULL),
add_columns = getOption("modelsummary_add_columns", default = NULL),
escape = getOption("modelsummary_escape", default = TRUE),
...
)
data |
A data.frame (or tibble) |
output |
filename or object type (character string)
|
fmt |
how to format numeric values: integer, user-supplied function, or
|
align |
A string with a number of characters equal to the number of columns in
the table (e.g.,
|
hrule |
position of horizontal rules (integer vector) |
title |
string. Cross-reference labels should be added with Quarto or Rmarkdown chunk options when applicable. When saving standalone LaTeX files, users can add a label such as |
notes |
list or vector of notes to append to the bottom of the table. |
add_rows |
a data.frame (or tibble) with the same number of columns as your main table. By default, rows are appended to the bottom of the table. Positions can be defined using integers. In the
|
add_columns |
a data.frame (or tibble) with the same number of rows as your main table. |
escape |
boolean TRUE escapes or substitutes LaTeX/HTML characters which could
prevent the file from compiling/displaying. |
... |
all other arguments are passed through to the table-making
functions tinytable::tt, kableExtra::kbl, gt::gt, DT::datatable, etc. depending on the |
Since version 2.0.0, modelsummary
uses tinytable
as its default table-drawing backend.
Learn more at: https://vincentarelbundock.github.io/tinytable/",
Revert to kableExtra
for one session:
options(modelsummary_factory_default = 'kableExtra')
options(modelsummary_factory_latex = 'kableExtra')
options(modelsummary_factory_html = 'kableExtra')
Arel-Bundock V (2022). “modelsummary: Data and Model Summaries in R.” Journal of Statistical Software, 103(1), 1-23. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v103.i01")}.'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.