I need to save latex and word versions of summary tables. Is there a pipe operator that can split the input into two outputs? Ideally I'd like something that will take species_tab and save into latex and word at the same time.
library(datasets)
library(flextable)
library(gt)
species_tab <- iris %>%
tabyl(Species)
species_tab %>%
gt() %>%
gtsave(filename = "species.tex")
species_tab %>%
flextable() %>%
save_as_docx(path = "species.docx")