R Setup – General

Below are the setup instructions for the various bits of software we use in our training courses.

Further instructions for specific platforms can be found at the following pages:

R & RStudio Setup

Install R

Install a recent version of R. We recommend a version >= R 3.5.1 “Feather Spray”.

> getRversion()
[1] ‘3.5.1

Install RStudio

RStudio is the most popular Integrated Development Environment (IDE) for R.

Install a recent version of RStudio. We recommend a version >= RStudio 1.1.463.

R Packages

Update Existing R Packages

Update all installed packages using either

> update.packages(ask = FALSE, checkBuilt = TRUE)

or

> devtools::upgrade_packages(TRUE)

Install Essential R Packages

There are some packages that we’ll always use. Make sure you have those installed.

> install.packages("tidyverse")

Install Other R Packages

Install other packages from CRAN.

> install.packages("flexdashboard")
> install.packages("learnr")
> install.packages("bookdown")

Install a few packages directly from GitHub.

> devtools::install_github('rstudio/blogdown', dependencies = TRUE, upgrade = "always")
> devtools::install_github('yihui/xaringan', dependencies = TRUE, upgrade = "always")

Hugo

Check installed version of Hugo.

> blogdown::hugo_version()

If Hugo was not found on your system then install using

> blogdown::install_hugo()

If the version is old (< 0.52) then update.

> blogdown::update_hugo()