View source: R/ard_categorical_max.R
ard_categorical_max | R Documentation |
Function calculates categorical variable level occurrences rates by maximum level per unique ID.
Each variable in variables
is evaluated independently and then results for all variables are stacked.
Only the highest-ordered level will be counted for each unique ID.
Unordered, non-numeric variables will be converted to factor and the default level order used for ordering.
ard_categorical_max(
data,
variables,
id,
by = dplyr::group_vars(data),
statistic = everything() ~ c("n", "p", "N"),
denominator = NULL,
fmt_fn = NULL,
stat_label = everything() ~ cards::default_stat_labels(),
quiet = FALSE,
...
)
data |
( |
variables |
( |
id |
( |
by |
( |
statistic |
( |
denominator |
( |
fmt_fn |
( |
stat_label |
( |
quiet |
(scalar |
... |
Arguments passed to methods. |
an ARD data frame of class 'card'
# Occurrence Rates by Max Level (Highest Severity) --------------------------
ard_categorical_max(
cards::ADAE,
variables = c(AESER, AESEV),
id = USUBJID,
by = TRTA,
denominator = cards::ADSL |> dplyr::rename(TRTA = ARM)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.