sort_ard_hierarchical {cards} | R Documentation |
Sort Stacked Hierarchical ARDs
Description
This function is used to sort stacked hierarchical ARDs.
For the purposes of this function, we define a "variable group" as a combination of ARD rows grouped by the
combination of all their variable levels, but excluding any by
variables.
Usage
sort_ard_hierarchical(x, sort = c("descending", "alphanumeric"))
Arguments
x |
( |
sort |
(
Defaults to |
Value
an ARD data frame of class 'card'
Note
If overall data is present in x
(i.e. the ARD was created with ard_stack_hierarchical(overall=TRUE)
), the
overall data will be sorted last within each variable group (i.e. after any other rows with the same combination of
variable levels).
See Also
Examples
ard_stack_hierarchical(
ADAE,
variables = c(AESOC, AEDECOD),
by = TRTA,
denominator = ADSL,
id = USUBJID
) |>
sort_ard_hierarchical("alphanumeric")
ard_stack_hierarchical_count(
ADAE,
variables = c(AESOC, AEDECOD),
by = TRTA,
denominator = ADSL
) |>
sort_ard_hierarchical("descending")