-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
What happened?
factor column here race, when rename_ard_columns() is called the values are coereced to integers and we loose the
character race values.
adsl_ <- cards::ADSL |>
dplyr::mutate(RACE = factor(RACE))
res <- cards::ard_categorical(
data = adsl_,
by = TRT01A,
variables = c(RACE, ETHNIC)
) |>
cards::rename_ard_columns()
res
#> # A tibble: 45 × 10
#> TRT01A RACE ETHNIC context stat_name stat_label stat fmt_fun warning error
#> <chr> <int> <chr> <chr> <chr> <chr> <lis> <list> <list> <list>
#> 1 Place… 1 <NA> catego… n n <int> <int> <NULL> <NULL>
#> 2 Place… 1 <NA> catego… N N <int> <int> <NULL> <NULL>
#> 3 Place… 1 <NA> catego… p % <dbl> <fn> <NULL> <NULL>
#> 4 Place… 2 <NA> catego… n n <int> <int> <NULL> <NULL>
#> 5 Place… 2 <NA> catego… N N <int> <int> <NULL> <NULL>
#> 6 Place… 2 <NA> catego… p % <dbl> <fn> <NULL> <NULL>
#> 7 Place… 3 <NA> catego… n n <int> <int> <NULL> <NULL>
#> 8 Place… 3 <NA> catego… N N <int> <int> <NULL> <NULL>
#> 9 Place… 3 <NA> catego… p % <dbl> <fn> <NULL> <NULL>
#> 10 Place… NA HISPA… catego… n n <int> <int> <NULL> <NULL>
#> # ℹ 35 more rows
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status