Create a pivot table with flextable
tibble::tibble(my_letters = sample(letters[1:4], 100, T),
my_numbers = sample(1:4, 100, T)) -> cross_table
cross_table %>%
make_pivot_table(my_letters, my_numbers, theme = "tron") -> tron_cross_table
## Warning: There was 1 warning in `dplyr::mutate()`.
## ℹ In argument: `dplyr::across(.fns = ~stringr::str_c("(", ., ")"))`.
## Caused by warning:
## ! Using `across()` without supplying `.cols` was deprecated in dplyr 1.1.0.
## ℹ Please supply `.cols` instead.
iris %>%
dplyr::mutate(Species1 = stringr::str_c(Species, " very good")) %>%
make_pivot_table(Species1, Species, show_percentages = "none", tbl_nm = "gold table", theme = "zebra_gold") -> tbl
tbl