gtsummary has been absolutely amazing for my workflow, and I would like some advice on how to switch between html and word output documents from Rmds.
In my current workflow, I tend to make large html files that are convenient for collaborators to navigate through. I can easily have dozens of gtsummary tables presented in an document. However, when it comes to collaborative writing of reports, I transition to working in Word.
My current workflow is to go through my documents, searching for every tbl_regression or tbl_merge, etc, and adding a
as_flex_table() to the end of the pipe sequence. Is there a better way to do this? Should I just as_flex_table() everything from the beginning, since I know that moving to Word for any given document is likely as the project finishes?
In my dream world, there would be wrapped functions for every gtsummary function that would create a gt/gtsummary object if the output of the Rmd is html and a flextable output if the output of the Rmd is Word, but perhaps that is overkill!
Thanks for any advice!