Renders a clerk_tbl as a gt table with clerkR styling applied via
clerk_theme(). Domain groupings become row-group labels; log-transformed
variables receive an automatic footnote; FDR-corrected tables receive an
automatic source note. Typically called indirectly via clerk_render().
Domains may be nested (a named list of named lists) to express
sub-sections within a domain, e.g. repeated timepoints within a
"Mental health" domain. gt itself has no native support for two-level
row-group headers, so a nested domain renders as a single compound row
group: the domain and subdomain names joined with an em dash, e.g.
"Mental health" + "Baseline" becomes one row group labelled
Mental health - Baseline (rendered with a true em dash, not a hyphen).
For a table with true expandable nested groups, use output = "html"
instead (see render_reactable()).
Usage
render_gt(
x,
title = NULL,
subtitle = NULL,
footnote = NULL,
footnotes = NULL,
fdr_footnote = TRUE,
...
)Arguments
- x
A
clerk_tblobject.- title
Optional table title.
- subtitle
Optional table subtitle.
- footnote
Optional character vector of blanket footnotes, one source note per element.
- footnotes
Optional list of targeted footnotes. Each element is a list with
textand eitherrows(variable names) orcols(column names).- fdr_footnote
Logical. Add an automatic FDR source note when a
p_fdrcolumn is present (defaultTRUE).- ...
Reserved for future use.
Examples
tbl_descriptive(clerk_example, group = sex) |>
render_gt(title = "Table 1")