If we have a character vector of all NA, there is nothing to tabulate and the error messaging is not helpful. I suppose this would happen for any NA vector except for factors and logicals since those two cases we know what the levels should be.
tibble::tibble(
# all_na_fct = factor(rep_len(NA, 10), levels = c("Yes", "No"))
# all_na_lgl = rep_len(NA, 10),
all_na_chr = rep_len(NA_character_, 10)
) |>
cards::ard_categorical(
variables = all_na_chr
)
#> Error in names(df) <- repaired_names(c(names2(dimnames(x)), n), repair_hint = TRUE, : 'names' attribute [2] must be the same length as the vector [1]
If we have a character vector of all NA, there is nothing to tabulate and the error messaging is not helpful. I suppose this would happen for any NA vector except for factors and logicals since those two cases we know what the levels should be.
Created on 2024-02-09 with reprex v2.1.0