If col2 is not supplied, will make a frequency table for 1 column.
make_pivot_table(
tbl,
col1,
col2 = NULL,
show_totals = TRUE,
show_percentages = c("none", "all", "row", "col"),
show_chi_test = FALSE,
theme = c("zebra_blue", "zebra_gold", "tron", "vader", "vanilla", "booktabs",
"alafoli"),
tbl_nm = NULL,
arrange_desc = TRUE
)
a flextable
a data frame to pivot
unquoted col 1
unquoted col 2
logical; show row and col totals
string; denominator to use when calculating percentages
logical; show results of chi squared test in footnote
string to choose a predefined theme
string to name table. If not given, automatically defaults to table name.
param for single col pivot table. if True arranges table by decreasing n size