- Markdown is plain text shorthand with a simple formatting syntax that can be easily translated or transformed into html formats. RStudio has some great references you can use, go to Help Markdown Quick Reference, or checkout some of the fancy cheatsheets.
- The R Markdown file is a text file where you save all the R commands you want to use, plus any text commenting on the work you are doing and the results you get. Parts of the file with a plain white background are normal text. You can format the text.
- Tell it with R Markdown. Turn your analyses into high quality documents, reports, presentations and dashboards. R Markdown documents are fully reproducible. Use a productive notebook interface to weave together narrative text and code to produce elegantly formatted output.
3.4 Word document
By default, R Markdown produces standalone HTML files with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. This means you can share or publish the file just like you share Office documents or PDFs.
To create a Word document from R Markdown, you specify the
word_document output format in the YAML metadata of your document:
The most notable feature of Word documents is the Word template, which is also known as the “style reference document.” You can specify a document to be used as a style reference in producing a
*.docx file (a Word document). This will allow you to customize things such as margins and other formatting characteristics. For best results, the reference document should be a modified version of a
.docx file produced using rmarkdown or Pandoc. The path of such a document can be passed to the
reference_docx argument of the
word_document format. Pass
'default' to use the default styles. For example:
For more on how to create and use a reference document, you may watch this short video: https://vimeo.com/110804387, or read this detailed article: https://rmarkdown.rstudio.com/articles_docx.html.
3.4.1 Other features
How To Make Table Of Contents Using R Markdown
Refer to Section 3.1 for the documentation of most features of Word documents, including figure options (Section 3.1.5), data frame printing (Section 3.1.6), syntax highlighting (Section 3.1.4), keeping Markdown (Section 22.214.171.124), Markdown extensions (Section 126.96.36.199), Pandoc arguments (Section 188.8.131.52), and shared options (Section 3.1.11).