ard_continuous {cards} | R Documentation |
Continuous ARD Statistics
Description
Compute Analysis Results Data (ARD) for simple continuous summary statistics.
Usage
ard_continuous(data, ...)
## S3 method for class 'data.frame'
ard_continuous(
data,
variables,
by = dplyr::group_vars(data),
strata = NULL,
statistic = everything() ~ continuous_summary_fns(),
fmt_fn = NULL,
stat_label = everything() ~ default_stat_labels(),
...
)
Arguments
data |
( |
... |
Arguments passed to methods. |
variables |
( |
by , strata |
(
Arguments may be used in conjunction with one another. |
statistic |
( The value assigned to each variable must also be a named list, where the names
are used to reference a function and the element is the function object.
Typically, this function will return a scalar statistic, but a function that
returns a named list of results is also acceptable, e.g.
|
fmt_fn |
( |
stat_label |
( |
Value
an ARD data frame of class 'card'
Examples
ard_continuous(ADSL, by = "ARM", variables = "AGE")
# if a single function returns a named list, the named
# results will be placed in the resulting ARD
ADSL |>
dplyr::group_by(ARM) |>
ard_continuous(
variables = "AGE",
statistic =
~ list(conf.int = \(x) t.test(x)[["conf.int"]] |>
as.list() |>
setNames(c("conf.low", "conf.high")))
)