library(presenter)
library(dplyr)
set.seed(1)
%>%
iris relocate("Species") %>%
sample_n(10) %>%
arrange(Species) -> iris_slice
<- c("Sepal", "Petal")
header_words <- "Species"
last_id_col
make_flextable(iris_slice, header_words = header_words, last_id_col = last_id_col) -> myflex
myflex
::tibble(my_letters = sample(letters[1:4], 100, T),
tibblemy_numbers = sample(1:4, 100, T)) -> cross_table
%>%
cross_table make_pivot_table(my_letters, my_numbers, theme = "tron") -> tron_cross_table
tron_cross_table
%>%
iris ::mutate(Species1 = stringr::str_c(Species, " very good")) %>%
dplyrmake_pivot_table(Species1, Species, show_percentages = "none", tbl_nm = "gold table", theme = "zebra_gold") -> tbl
tbl
%>%
myflex export_powerpoint() # a new ppt is created, named after the table
%>%
tron_cross_table export_powerpoint("myflex.pptx") # append this slide to the previous ppt
Multiple powerpoint slides