Closed DanChaltiel closed 2 months ago
replace .showNA = showNA == "always" || showNA == "ifany" && (anyNA(x)) by .showNA = showNA == "always" || showNA == "ifany" && (anyNA(x) || anyNA(levels(x)))
.showNA = showNA == "always" || showNA == "ifany" && (anyNA(x))
.showNA = showNA == "always" || showNA == "ifany" && (anyNA(x) || anyNA(levels(x)))
reprex:
debugonce(crosstable:::summarize_categorical_single) a = mtcars2 %>% mutate(am = ifelse(runif(n())>.8 & vs=='vshaped', NA, am) %>% factor() %>% fct_na_value_to_level()) a %>% crosstable(am, by=vs, total="row")
seems to be fixed in v0.7.0.9009
replace
.showNA = showNA == "always" || showNA == "ifany" && (anyNA(x))
by.showNA = showNA == "always" || showNA == "ifany" && (anyNA(x) || anyNA(levels(x)))
reprex: