update_ard {cards} | R Documentation |
Update ARDs
Description
Functions used to update ARD formatting functions and statistic labels.
This is a helper function to streamline the update process. If it does not exactly meet your needs, recall that an ARD is just a data frame and it can be modified directly.
Usage
update_ard_fmt_fun(
x,
variables = everything(),
stat_names,
fmt_fun,
filter = TRUE,
fmt_fn = deprecated()
)
update_ard_stat_label(
x,
variables = everything(),
stat_names,
stat_label,
filter = TRUE
)
Arguments
x |
( |
variables |
( |
stat_names |
( |
fmt_fun |
( |
filter |
( |
fmt_fn |
|
stat_label |
( |
Value
an ARD data frame of class 'card'
Examples
ard_continuous(ADSL, variables = AGE) |>
update_ard_fmt_fun(stat_names = c("mean", "sd"), fmt_fun = 8L) |>
update_ard_stat_label(stat_names = c("mean", "sd"), stat_label = "Mean (SD)") |>
apply_fmt_fun()
# same as above, but only apply update to the Placebo level
ard_continuous(
ADSL,
by = ARM,
variables = AGE,
statistic = ~ continuous_summary_fns(c("N", "mean"))
) |>
update_ard_fmt_fun(stat_names = "mean", fmt_fun = 8L, filter = group1_level == "Placebo") |>
apply_fmt_fun()