tbl_ard_wide_summary {gtsummary} | R Documentation |
Wide ARD summary table
Description
This function is similar to tbl_ard_summary()
, but places summary statistics
wide, in separate columns.
All included variables must be of the same summary type, e.g. all continuous
summaries or all categorical summaries (which encompasses dichotomous variables).
Usage
tbl_ard_wide_summary(
cards,
statistic = switch(type[[1]], continuous = c("{median}", "{p25}, {p75}"), c("{n}",
"{p}%")),
type = NULL,
value = NULL,
include = everything()
)
Arguments
cards |
( |
statistic |
( |
type |
( |
value |
( |
include |
( |
Value
a gtsummary table of class 'tbl_wide_summary'
Examples
library(cards)
ard_stack(
trial,
ard_continuous(variables = age),
.missing = TRUE,
.attributes = TRUE
) |>
tbl_ard_wide_summary()
ard_stack(
trial,
ard_dichotomous(variables = response),
ard_categorical(variables = grade),
.missing = TRUE,
.attributes = TRUE
) |>
tbl_ard_wide_summary()