View source: R/ard_hierarchical.R
| ard_hierarchical | R Documentation |
Functions ard_hierarchical() and ard_hierarchical_count() are primarily helper
functions for ard_stack_hierarchical() and ard_stack_hierarchical_count(),
meaning that it will be rare a user needs to call
ard_hierarchical()/ard_hierarchical_count() directly.
Performs hierarchical or nested tabulations, e.g. tabulates AE terms nested within AE system organ class.
ard_hierarchical() includes summaries for the last variable listed
in the variables argument, nested within the other variables included.
ard_hierarchical_count() includes summaries for all variables
listed in the variables argument each summary nested within the preceding
variables, e.g. variables=c(AESOC, AEDECOD) summarizes AEDECOD nested
in AESOC, and also summarizes the counts of AESOC.
ard_hierarchical(data, ...)
ard_hierarchical_count(data, ...)
## S3 method for class 'data.frame'
ard_hierarchical(
data,
variables,
by = dplyr::group_vars(data),
statistic = everything() ~ c("n", "N", "p"),
denominator = NULL,
fmt_fun = NULL,
stat_label = everything() ~ default_stat_labels(),
id = NULL,
fmt_fn = deprecated(),
...
)
## S3 method for class 'data.frame'
ard_hierarchical_count(
data,
variables,
by = dplyr::group_vars(data),
fmt_fun = NULL,
stat_label = everything() ~ default_stat_labels(),
fmt_fn = deprecated(),
...
)
data |
( |
... |
Arguments passed to methods. |
variables |
( |
by |
( |
statistic |
( |
denominator |
(
|
fmt_fun |
( |
stat_label |
( |
id |
( |
fmt_fn |
an ARD data frame of class 'card'
ard_hierarchical(
data = ADAE |>
dplyr::slice_tail(n = 1L, by = c(USUBJID, TRTA, AESOC, AEDECOD)),
variables = c(AESOC, AEDECOD),
by = TRTA,
id = USUBJID,
denominator = ADSL
)
ard_hierarchical_count(
data = ADAE,
variables = c(AESOC, AEDECOD),
by = TRTA
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.