Reporting regression tables using rmarkdown in Word format

Use write_html (from the memisc package):

write.html(mt, "mt.html")

Now open the mt.html file in Word. This is what it looks like in Word. (continued after screenshot)

screenshot

Alternately use this to convert filePathIn (which is the path to the html file created) to filePathOut (which is the path to the docx file to be created from it). This works on Windows and even in cases where pandoc does not as it uses Word itself to do the translation from html to docx. (If you want a doc file rather than docx then replace "docx" with "doc" in the filePathOut definition and replace 16 with 0 in the SaveAs line. See wdSaveFormat Enumeration.)

library(RDCOMClient)

filePathIn <- file.path(getwd(), "mt.html")
filePathOut <- sub("html$", "docx", filePathIn)

w <- COMCreate("Word.Application")
doc <- w[["Documents"]]
od <- doc$Open(filePathIn)
od$SaveAs(filePathOut, 16)
w$Quit()