View source: R/brdg_continuous.R
brdg_continuous | R Documentation |
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.
brdg_continuous(cards, by = NULL, statistic, include, variable, type)
cards |
( |
by |
( |
statistic |
(named |
include |
( |
variable |
( |
type |
(named |
a gtsummary object
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})"),
type = list(grade = "categorical")
) |>
as_tibble()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.