R to collaborative Google Docs workflow ideas


Phineas Packard
TL;DR; I am looking for workflow ideas to dynamically import tables and figures into a google doc that I am working on collaboratively with multiple people.

I find myself working a lot with colleagues on google docs who are not sufficiently familiar with R or markdown to use .Rmd files. I am thus looking for a workflow where I can import results (tables and figures) into google docs that update as modelling changes etc. I cannot write results to word and upload to google drive as that would interfere with what everyone else is doing.

The most primitive thing I can think of is to use the googlesheets4 package to write (or overwrite) results to google sheets -> insert results from google sheets to google docs as a table -> use the update links command in google docs when I update the results. This obviously isn’t going to work for figures and is pretty inelegant.

My second thought was to write results from R to an image uploaded onto google drive using the flextable package. This is the ideal situation as I get the tables and figures exactly how I want. The issue is that when I alter the tables or figures google docs does not update (for obvious reasons). Thus I have being trying to find a way to have dynamic images in google docs but nothing seems to work.

Now I am stuck and out of idea.

May 13, 2020: Now crossposted here
Last edited: