Produces a concise descriptive summary — mean ± SD for continuous variables
and n (%) for categorical variables — with no group comparisons or
statistical tests. Formatting defaults inherited from clerk_options().
Arguments
- data
A data frame.
- vars
<
tidy-select> Variables to include. Defaults to all columns.- domains
A named list mapping variable names to domain/section labels. An entry may itself be a named list to create a nested sub-section within a domain (e.g. repeated timepoints) – see
vignette("formatting-options").- log_vars
Character vector of log-transformed variable names.
- digits
Integer. Decimal places for continuous variables.
- domain_other
Character string. Label for variables not assigned to any domain. Default
""(blank). Inherits fromclerk_options()$domain_other.- output
Character string. One of
"gt"(default),"html", or"latex".
Examples
tbl_simple(
clerk_example,
domains = list(
"Metabolic" = c("hdl", "glucose", "bmi"),
"Mental health"= c("bdi", "panas_neg")
),
log_vars = "tmt_time",
output = "gt"
) |> clerk_render(title = "Descriptive statistics")