cards icon indicating copy to clipboard operation
cards copied to clipboard

`ard_stack()` doesn't work without a `by` argument specified

Open ddsjoberg opened this issue 1 month ago • 2 comments

It's useful to use ard_stack() without a by argument for the .attributes and .missing arguments.

library(cards)
packageVersion("cards")
#> [1] '0.1.0.9023'

ard_stack(
  data = ADSL, 
  ard_categorical(variables = "AGEGR1"),
  ard_continuous(variables = "AGE")
)
#> Error in `ard_stack()`:
#> ! Error processing `by` argument.
#> ! ℹ In argument: `ard_categorical(variables = "AGEGR1")`. Caused by error in
#>   `ard_stack()`: ! The `data` argument cannot be missing.
#> ℹ Select among columns "STUDYID", "USUBJID", "SUBJID", "SITEID", "SITEGR1",
#>   "ARM", "TRT01P", "TRT01PN", "TRT01A", "TRT01AN", "TRTSDT", "TRTEDT",
#>   "TRTDUR", "AVGDD", "CUMDOSE", "AGE", "AGEGR1", "AGEGR1N", …, "DCREASCD", and
#>   "MMSETOT"

Created on 2024-05-08 with reprex v2.1.0

ddsjoberg avatar May 09 '24 04:05 ddsjoberg