Installing R and RStudio

Preamble

For this course you need install R, Rtools and RStudio and a sweep of packages onto your computer.

Download and install R

Latest version of R: see The Comprehensive R Archive Network. Follow the instructions to complete the installation process:

Rtools

If your platform is Windows, it is recommended that you install Rtools

RStudio

Latest version of RStudio Desktop can be obtained from this link

Installing packages

We may as well try to install/update the main package we will use in the course now. Lets open RStudio and type the following code into the console:

install.packages("tidyverse")

Those who already have installed tidyverse may want to run:

tidyverse::tidyverse_update()

This will install among other things install the core tidyverse packages:

  • ggplot2, for data visualization.
  • dplyr, for data manipulation.
  • tidyr, for data tidying.
  • readr, for data import.
  • purrr, for functional programming.
  • tibble, for “tibbles”, a modern re-imagining of data frames.
  • stringr, for strings
  • forcats, for factors
  • lubridate, for date/times.

library(tidyverse) will load these packages.

Additional packages will be install as we progress through the course.

A non-exhaustive list of additional packages that may be used

JAGS

Install the Gibbs sampler JAGS for your Operating System from the following web site:

http://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/