Installing R, RStudio, R Markdown, Latex

Supplement to pol346

Team 346 pol346.com (Department of Politics, Princeton University)http://princeton.edu/politics
2020-02-12

Table of Contents


For POL346, we require students shift away from word processors like Microsoft Word and use a workflow that involves R and a formatting language called R Markdown (as is done in POL345). The two languages are glued together with another language called knitr. Certain kinds of advanced typography, like formulas, rely on yet another language called Latex. Installing and configuring all of this will impose a modest learning curve at the start but will make life much easier down the road.

The basic advantage of R + R Markdown + knitr + Latex is that you can easily braid together your prose, R code, formulas and R output (e.g., plots and tables) in a single document. This not only saves time and makes life easier by reducing the number of files that need to be managed, it also helps with creating better research such as when you write JPs or Senior Theses (we’ll discuss this more in class).

To get set up with R + R Markdown + knitr + Latex, please do the following before precept:

Install software and packages

If necessary, install LaTeX

TinyTeX

Alternate ways to install LaTeX

Test your installation