These selection helpers match variables according to a given pattern.
all_ard_groups()
: Function selects grouping columns, e.g. columns named"group##"
or"group##_level"
.all_ard_variables()
: Function selects variables columns, e.g. columns named"variable"
or"variable_level"
.all_ard_group_n()
: Function selectsn
grouping columns.all_missing_columns()
: Function selects columns that are allNA
or empty.
Examples
ard <- ard_categorical(ADSL, by = "ARM", variables = "AGEGR1")
ard |> dplyr::select(all_ard_groups())
#> {cards} data frame: 27 x 2
#> group1 group1_level
#> 1 ARM Placebo
#> 2 ARM Placebo
#> 3 ARM Placebo
#> 4 ARM Xanomeli…
#> 5 ARM Xanomeli…
#> 6 ARM Xanomeli…
#> 7 ARM Xanomeli…
#> 8 ARM Xanomeli…
#> 9 ARM Xanomeli…
#> 10 ARM Placebo
#> ℹ 17 more rows
#> ℹ Use `print(n = ...)` to see more rows
ard |> dplyr::select(all_ard_variables())
#> {cards} data frame: 27 x 2
#> variable variable_level
#> 1 AGEGR1 65-80
#> 2 AGEGR1 65-80
#> 3 AGEGR1 65-80
#> 4 AGEGR1 65-80
#> 5 AGEGR1 65-80
#> 6 AGEGR1 65-80
#> 7 AGEGR1 65-80
#> 8 AGEGR1 65-80
#> 9 AGEGR1 65-80
#> 10 AGEGR1 <65
#> ℹ 17 more rows
#> ℹ Use `print(n = ...)` to see more rows