I have seen that there is already a question about that known limitation for pptx. But is there a workaround like converting it first into an image and import that to pptx or something similar? I don‘t care that the table can‘t be edited afterwards, that would actually be an advantage.
Edit: Here as wished a minimal example where the Graphs are not included in the pptx.
library(flextable)
library(data.table)
library(officer)
library(dplyr)
z <- as.data.table(ggplot2::diamonds)
z <- z[, list(
price = mean(price, na.rm = TRUE),
list_col = list(.SD$x)
), by = "cut"]
z
ft <- flextable(data = z) %>%
compose(j = "list_col", value = as_paragraph(
plot_chunk(value = list_col, type = "dens", col = "pink",
width = 1.5, height = .4, free_scale = TRUE)
)) %>%
colformat_double(big.mark = " ", suffix = " $") %>%
set_header_labels(list_col = "density") %>%
autofit()
ft
print(ft, preview = "pptx")