dear all,
I'm trying to generate a word document containing a table (flextable::regulartable) next to a plot from a shiny app.
Does someone have an idea?
Thanks !
Unfortunately as far as I know layout definition for word documents if quite limited... HTML and PDF have much more flexibility in that regard.
My suggestion would be you combine the table and plot as one figure, then insert it as a whole. This can be easily done with the gridExtra package. Here is an example:
I agree, it's not a great solution, because having a table as an image limits its usability a lot, but you know how difficult it is in word (even manually) to align two pictures or table and picture on the same row without it jumping around ...
One other idea would be you force the document to have two columns (if that's even possible, maybe through a template) and have each in one column. I found a post where they managed it for powerpoint: