Learn R Programming

modelsummary (version 0.3.0)

build_gt: Internal function to build table with `gt`

Description

Internal function to build table with `gt`

Usage

build_gt(tab, title, subtitle, stars, stars_note, notes, output, ...)

Arguments

title

string

subtitle

This argument is deprecated. Use `title` or the `tab_header` function from the `gt` package.

stars

to indicate statistical significance

  • FALSE (default): no significance stars.

  • TRUE: *=.1, **=.05, ***=.01

  • Named numeric vector for custom stars such as `c('*' = .1, '+' = .05)`

stars_note

argument passed by `modelsummary()`

notes

list of notes to append to the bottom of the table.

output

filename or object type (string)

  • Supported filename extensions: .html, .tex, .md, .txt, .png, .jpg.

  • Supported object types: "gt", "html", "markdown", "latex". "gt" objects are created by the `gt` package; other object types are created by the `kableExtra` package.

  • When a file name is supplied to the `output` argument, the table is written immediately to file. If you want to customize your table by post-processing it with functions provided by the `gt` or `kableExtra` packages, you need to choose a different output format (e.g., "gt", "latex", "html", "markdown"), and you need to save the table after post-processing using the `gt::gtsave`, `kable::save_kable`, or `cat` functions.

...

all other arguments are passed to the `tidy` method used to extract estimates from the model. For example, this allows users to set `exponentiate=TRUE` to exponentiate logistic regression coefficients.

Value

tbl_gt object