RMarkdown combines the core syntax of Markdown with embedded R code chunks to create dynamic documents. It enables easy creation of dynamic documents, reports and presentations which are fully reproducible.
With RMarkdown, we can combine R codes, plots and text to create beautiful reports and presentations. The reports can be generated in different formats such as:
The best part about RMarkdown is when you have to make some changes to your code or the underlying data and recreate the entire document. You can make the necessary changes and RMarkdown will recreate the document with just a single click of a button.
Install and load the rmarkdown package.
# install library(rmarkdown)
In order to generate PDF documents/presentations, you will need LaTex. If you have not heard of or installed LaTex, you can instead use TinyTex.