16.1 Installation

16.1.1 R

Download and install the latest version of R from:

https://www.stats.bris.ac.uk/R/

Windows: Download R for Windows - base - Download R 3.6.0 for Windows

Mac: Download R for (Mac) OS X - R-3.6.0.pkg

16.1.2 RStudio

Then download and install RStudio:

https://www.rstudio.com/products/rstudio/download/#download

Windows: RStudio 1.2.1335 - Windows 7+

Mac: RStudio 1.2.1335 - Mac OS X 10.12+ (64-bit)

16.1.3 R packages

Open RStudio and copy-paste the lines below into the Console and press Enter:

Then Restart R before running the next two lines (same as before, copy-paste to the Console):

If it asks you “Do you want to restart your R session”, press Yes the first time. If it immediately asks again, press No.

Code to check tinyTex and Tex working as expected:

16.1.4 Troubleshooting 3.3

  1. ~“can’t find remotes”: try doing step 3.2 (restart) again. We only just installed remotes:: in 3.1 so RStudio needs a restart before we can start using it.

  2. ~“TeX failed, you already have a TeX distribution…”. If you already have LaTex installed on your computer, the tinytex::install_tinytex() one is not necessary and might not work. This is fine, there is no harm in copy-pasting in anyway if you are not sure.