My workflow looks involves producing Microsoft Word reports (using Rmarkdown) containing analysis of data. These reports are then reviewed and commented using Word's call-out comments feature. It's easier to make edits addressing the comments within the Word document, so that's what I do. I would now like to carry over these changes onto the Rmarkdown document. How can I do this?
Can I convert docx to Rmarkdown directly? I'm aware I can convert docx to markdown using Pandoc.
Here's an example of converting from a .docx Word file to R markdown, and then to HTML.
require(rmarkdown);require(devtools)
examplefile=paste0(tempdir(),"/example.docx")
download.file("https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.docx",destfile=examplefile)
pandoc_convert(examplefile,to="markdown",output = "example.rmd", options=c("--extract-media=."))
render(paste0(tempdir(), "/example.rmd"),"html_document")
browseURL(paste0(tempdir(),"/example.html"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With