This is a wrapper to [base::table()] and [base::prop.table()] but returns the contingency and proportional table as a single character string.
Examples
data(mtcars)
crosstab(mtcars$am)
#> [1] "0: 19 (59.38%); 1: 13 (40.62%)"
This is a wrapper to [base::table()] and [base::prop.table()] but returns the contingency and proportional table as a single character string.
data(mtcars)
crosstab(mtcars$am)
#> [1] "0: 19 (59.38%); 1: 13 (40.62%)"