powered by
A wrapper of table() for convenient use in a dplyr pipeline: Pass the factors to tabulate as symbols or expressions like you would in mutate(). useNA and dnn are passed to table().
cross_tabulate(.df, ..., useNA = c("no", "ifany", "always"), dnn = NULL)
A data frame
Factors to tabulate by: symbolic column names / language
passed to table()
table()
Result from a call to table()
# NOT RUN { library(magrittr) if (requireNamespace("survival", quietly = TRUE)) { survival::bladder1 %>% cross_tabulate(treatment, recur) %>% chisq.test() } # }
Run the code above in your browser using DataLab