If you have any problems with software installation or downloading data, please contact one of the instructors before the course.
All the software required to run this course can be installed on your own machine. We also have additional laptops available for use during the course. Alternatively, if installation proves to be difficult, we can also provide you with access to a web-based virtual learning environment.
To install R and RStudio on your own computer, please follow the instructions below:
R and RStudio are separate
downloads and installations. R is the underlying statistical computing
environment, but using R alone is no fun. RStudio is a graphical
integrated development environment (IDE) that makes using R much easier
and more interactive. You need to install R before you install RStudio.
After installing both programs, you will need to install the
tidyverse
package from within RStudio.
Follow the instructions below for your operating system, and then follow
the instructions to install the tidyverse
package.
sessionInfo()
,
which will also display which version of R you are running. Go on the CRAN website and
check whether a more recent version is available. If so, please download
and install it. You can check
here for more information on how to remove old versions from your
system if you wish to do so..exe
file that was just downloaded.pkg
file for the latest R versionsudo apt-get install r-base
, and for Fedora
sudo yum install R
), but we don’t recommend this approach
as the versions provided by this are usually out of date. In any case,
make sure you have at least R 4.x.sudo dpkg -i rstudio-x.yy.zzz-amd64.deb
at
the terminal).tidyverse
After installing R and RStudio, you need to install the
tidyverse
package.
After starting RStudio, at the console type:
install.packages("tidyverse")
You can also do this by going to Tools -> Install Packages and typing the names of the packages separated by a comma. Press Install (a lot of text will start printing on the panel called “Console”)
On the RStudio panel named “Console” type
library(tidyverse)
and press Enter
A message similar to this should print:
── Attaching packages ─────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
✔ ggplot2 3.2.1 ✔ purrr 0.3.2
✔ tibble 2.1.3 ✔ dplyr 0.8.3
✔ tidyr 1.0.0 ✔ stringr 1.4.0
✔ readr 1.3.1 ✔ forcats 0.4.0
── Conflicts ────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
If instead you get the message:
Error in library(tidyverse) : there is no package called ‘tidyverse’
then your package installation did not work. Please ask the instructors for assistance before the course.
tidyverse
If you already have R installed and have used tidyverse
before, then it would be good to check that you are using the latest
version. To do this, go to Tools > Check for package
updates… and look at the list of updates it gives you. If
tidyverse
is in the list, tick the box and press
Install updates. Alternatively, just select all of the
available updates and install them.
After installing RStudio, change some of its default options (you only need to do this once):