Get Started
My environment for R Markdown was R Studio on Windows 10. The topics discussed in this tutorial should be the same for Linux and Mac, the only difference may be the path structure of the working directory.
Before you can produce your first R Markdown file, you want to install the R Markdown package:
install.packages("rmarkdown")
Now you can go on File -> New File -> R Markdown to create your first file.
Every file starts with a example text, which you can already render into a .html document. But your thesis is probably required to be in the .pdf format, therefore you need to install a \(\LaTeX\) distribution. If you are on a Windows machine, I would recommend MiKTeX, for Linux or Mac you can use TeX Live or MacTex. Keep in mind, you do not have to be familiar with \(\LaTeX\), it is just needed for the conversion into .pdf
.
What you also want to do, is to change the settings of your \(\LaTeX\) distribution, such that packages which you may need in the R Markdown file are automatically downloaded. For MiKTeX you just go to ‘Settings’ and check the box ‘Always install missing packages on-the-fly’
For rendering your file you just have to press the Knit button and voilà, there is your first document.