I am creating a Word document (.docx) using LibreOffice. I need to include some numeric results I calculated in R. They look like a simple table of numbers, with text captions for the rows and columns, and a few NAs here and there (a string representing R's "missing value" constant).
I tried saving the table to disk in a .csv format, opening it in LibreOffice Calc, and copy-pasting it into Writer. It got inserted as an OLE object. This has several problems. First, this means that the document is big and slow to open. Second, I am afraid of compatibility problems (I don't trust that the OLE object will work fine when somebody else reads this thing with Word instead of LibreOffice). Third, it formats the numbers in the table as numbers (right-adjusted), but the NA values as text (left-adjusted), and also all the numbers on a row containing an NA as text. So it is very hard to read, as the columns don't line up.
I know I could create a table in LibreOffice and copy-paste the numbers there. But is there a quicker solution, maybe some Word addon which automatically creates tables from .csv, or maybe a way to save the R output as a HTML table (those get formatted automatically when pasted in LibreOffice)? I don't need fancy looks as long as everything lines up and creates a native Word table.