Chapter 1 Installation

To use R Markdown, you have to install R (R Core Team 2024) and the R package rmarkdown (Allaire, Xie, Dervieux, McPherson, et al. 2024).

# install the rmarkdown package from CRAN in R
install.packages("rmarkdown")

# or install from GitHub if you want to test the
# development version
if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("rstudio/rmarkdown")

Unless you have a favorite editor or IDE (Integrated Development Environment), we recommend that you also install the RStudio IDE (https://www.rstudio.com). RStudio is not required, but it will make it easier for an average user to work with R Markdown because of the strong editor support. If you choose not to use the RStudio IDE, you will need to install Pandoc (see Section 1.1), which is the tool used by rmarkdown to convert Markdown to other document formats.

If you need to create PDF output, you may need to install LaTeX (Section 1.2) and certain LaTeX packages (Section 1.3).

References

Allaire, JJ, Yihui Xie, Christophe Dervieux, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, et al. 2024. Rmarkdown: Dynamic Documents for r. https://github.com/rstudio/rmarkdown.
R Core Team. 2024. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.