This function ingests an ARD object and shuffles the information to prepare for analysis. Helpful for streamlining across multiple ARDs. Combines each group/group_level into 1 column, back fills missing grouping values from the variable levels where possible, and optionally trims statistics-level metadata.
Arguments
- x
(
data.frame
)
an ARD data frame of class 'card'- trim
(
logical
)
logical representing whether or not to trim away statistic-level metadata and filter only on numeric statistic values.
Examples
bind_ard(
ard_categorical(ADSL, by = "ARM", variables = "AGEGR1"),
ard_categorical(ADSL, variables = "ARM")
) |>
shuffle_ard()
#> # A tibble: 36 × 6
#> ARM variable label context stat_name stat
#> <chr> <fct> <chr> <chr> <chr> <dbl>
#> 1 Placebo AGEGR1 65-80 categorical n 42
#> 2 Placebo AGEGR1 65-80 categorical N 86
#> 3 Placebo AGEGR1 65-80 categorical p 0.488
#> 4 Placebo AGEGR1 <65 categorical n 14
#> 5 Placebo AGEGR1 <65 categorical N 86
#> 6 Placebo AGEGR1 <65 categorical p 0.163
#> 7 Placebo AGEGR1 >80 categorical n 30
#> 8 Placebo AGEGR1 >80 categorical N 86
#> 9 Placebo AGEGR1 >80 categorical p 0.349
#> 10 Xanomeline High Dose AGEGR1 65-80 categorical n 55
#> # ℹ 26 more rows