View source: R/sort_ard_hierarchical.R
| sort_ard_hierarchical | R Documentation |
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.
sort_ard_hierarchical(x, sort = everything() ~ "descending")
x |
( |
sort |
(
Defaults to |
an ARD data frame of class 'card'
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).
filter_ard_hierarchical()
ard_stack_hierarchical(
ADAE,
variables = c(AESOC, AEDECOD),
by = TRTA,
denominator = ADSL,
id = USUBJID
) |>
sort_ard_hierarchical(AESOC ~ "alphanumeric")
ard_stack_hierarchical_count(
ADAE,
variables = c(AESOC, AEDECOD),
by = TRTA,
denominator = ADSL
) |>
sort_ard_hierarchical(sort = list(AESOC ~ "alphanumeric", AEDECOD ~ "descending"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.