rdatatables

How to save table1 package output table to .doc format? R


Package "table1" allows for some amazing tables to be made. However, i can't figure how to export one to .doc format.

Here is an example code:

table1( ~ x | Y, data = df)

I wonder if it is possible to somehow save resulting table into .doc format so it still looks like this:

enter image description here


Solution

  • Turns out it's very simple:

    Just cmd+a the table in Rstudio viewer -> cmd+c -> paste Special in MS Word -> chose .html format!