make_pivot_table {presenter}R Documentation

Make pivot table

Description

If col2 is not supplied, will make a frequency table for 1 column.

Usage

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
)

Arguments

tbl

a data frame to pivot

col1

unquoted col 1

col2

unquoted col 2

show_totals

logical; show row and col totals

show_percentages

string; denominator to use when calculating percentages

show_chi_test

logical; show results of chi squared test in footnote

theme

string to choose a predefined theme

tbl_nm

string to name table. If not given, automatically defaults to table name.

arrange_desc

param for single col pivot table. if True arranges table by decreasing n size

Value

a flextable


[Package presenter version 0.1.2 Index]