brdg_continuous {gtsummary} | R Documentation |
Continuous Summary Table Bridges
Description
Bridge function for converting tbl_continuous()
cards to basic gtsummary objects.
This bridge function converts the 'cards' object to a format suitable to
pass to brdg_summary()
: no pier_*()
functions required.
Usage
brdg_continuous(cards, by = NULL, statistic, include, variable)
Arguments
cards |
( |
by |
( |
statistic |
(named |
include |
( |
variable |
( |
Value
a gtsummary object
Examples
library(cards)
bind_ard(
# the primary ARD with the results
ard_continuous(trial, by = grade, variables = age),
# add missing and attributes ARD
ard_missing(trial, by = grade, variables = age),
ard_attributes(trial, variables = c(grade, age))
) |>
# adding the column name
dplyr::mutate(
gts_column =
ifelse(!context %in% "attributes", "stat_0", NA_character_)
) |>
brdg_continuous(
variable = "age",
include = "grade",
statistic = list(grade = "{median} ({p25}, {p75})")
) |>
as_tibble()
[Package gtsummary version 2.0.0 Index]