Function converts a gtsummary object to a huxtable object. A user can use this function if they wish to add customized formatting available via the huxtable functions. The huxtable package supports output to PDF via LaTeX, as well as HTML and Word.
1 2 3 4 5 6
Object created by a function from the gtsummary package (e.g. tbl_summary or tbl_regression)
Commands to include in output. Input may be a vector of
quoted or unquoted names. tidyselect and gtsummary select helper
functions are also accepted.
Logical. Default is
When TRUE, all double asterisk (markdown language for bold weight) in column labels and spanning headers are removed. Default is TRUE
A huxtable object
as_hux_table() takes the data frame that will be printed, converts
it to a huxtable and formats the table with the following huxtable functions:
huxtable::insert_row() to insert header rows
huxtable::align() to set column alignment
huxtable::set_left_padding() to indent variable levels
huxtable::add_footnote() to add table footnotes and source notes
huxtable::set_bold() to bold cells
huxtable::set_italic() to italicize cells
huxtable::set_na_string() to use an em-dash for missing numbers
Any one of these commands may be omitted using the
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.