Introduction

The start of writing a thesis is maybe the hardest part of the process. You are confronted with a difficult topic that you need to grasp, while simultaneously deciding which text editor you should use. With this little post, I hope to encourage you to try something different. Instead of using Word, which you should not, or \(\LaTeX\), which has a steep learning curve, I propose you use R Markdown for your thesis.

R Markdown allows you to combine text and code in one file which makes a lot of things much easier. On top of that, the document that you will create is almost guaranteed to look professional and clean.

To give you only one of the many advantages that R Markdown has over its competitors: It is very easy to be consistent and you do not need to worry about updating statistical output in the text. You can just write R code in your text and if the data set is changed, the number in your final document is automatically updated through the R code.

Furthermore, R Markdown is an extension of the Markdown language which is really simple to learn and can be extended through some simple \(\LaTeX\) commands:
  • *italic*italic
  • **bold**bold
  • $X_n = x_0 + \sum_{j=1}^n Z_j$\(X_n = x_0 + \sum_{j=1}^n Z_j\)

If your thesis is somehow connected to R, or may just include some mathematical notation, I think you cannot go wrong with R Markdown. If you have not worked with \(\LaTeX\) yet, this whole process may look scary, but I did not have any experience with TeX previously and managed to get the few things I needed done. Stackoverflow and Stackexchange are your friends. Also, you do not have to be an expert in R to use R Markdown. I had some experience with R before, but I really believe that everybody can use R Markdown.

Now I am in no way, shape or form an expert on any of this and there are probably better and more efficient ways of doing things. But the things discussed in this tutorial worked for me and if they make your life marginally easier then I am more than glad.

I have structured this little tutorial such that you can just pick a topic that you may be struggling with and see what I did.

For a more in-depth tutorial I would recommend the book from the creators of rmarkdown (Xie, Allaire, and Grolemund 2018).

References

Xie, Yihui, J.J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown.