cards
cards copied to clipboard
`ard_stack(by)` argument not passed to `ard_missing()`
When we specify a by
variable and .missing=TRUE
, the missingness is not tabulated with the by
arg specified.
TODO: If .overall=TRUE, .missing=TRUE
, check that the overall missing are also included in results.
library(cards)
packageVersion("cards")
#> [1] '0.1.0.9023'
ard_stack(
data = ADSL,
by = ARM,
ard_continuous(variables = "AGE", statistic = ~continuous_summary_fns("mean")),
.missing = TRUE
)
#> {cards} data frame: 22 x 11
#> group1 group1_level variable variable_level stat_name stat_label stat
#> 1 ARM Placebo AGE mean Mean 75.209
#> 2 ARM Xanomeli… AGE mean Mean 74.381
#> 3 ARM Xanomeli… AGE mean Mean 75.667
#> 4 <NA> AGE N_obs Vector L… 254
#> 5 <NA> AGE N_miss N Missing 0
#> 6 <NA> AGE N_nonmiss N Non-mi… 254
#> 7 <NA> AGE p_miss % Missing 0
#> 8 <NA> AGE p_nonmiss % Non-mi… 1
#> 9 <NA> ARM Placebo n n 86
#> 10 <NA> ARM Placebo N N 254
#> ℹ 12 more rows
#> ℹ Use `print(n = ...)` to see more rows
#> ℹ 4 more variables: context, fmt_fn, warning, error
Created on 2024-05-09 with reprex v2.1.0