10.6 Convert Markdown files to Word - Video Tutorials & Practice Problems
Video duration:
1m
Play a video:
<v Voiceover>While it</v> has always been easy to convert a markdown document to HTML, converting to Word used to require you manually using Pandoc. Thankfully, Rstudio has made this easier, and you can do it all within Rstudio. Come back to the gear icon, and under Output Format, change it from HTML to Word. Notice there are fewer options with Word. There's only a General tab, which has syntax highlighting and figures, so you could render figures with captions or change the size. But it is the ability to change to a word document which is so incredible. Let's click OK, and notice how our YAML header changes. It's now a Word document, and it still thinks it's going to a HTML document. That's because you're able to output to multiple documents at once. Let's get rid of that. Let's just do a Word document, and let's knit it. As you can see, it launches Word. And we now have a Microsoft Word document. Such a great feature really should spur collaboration between technical and non-technical people. The power of this cannot be understated.