To return to the previous page click here or use the back button on your browser.
R is available from https://www.cran.r-project.org/
RStudio is available from https://www.rstudio.com/
Download R first, then RStudio
. R is the main software we are using, whilst RStudio
is a user-friendly interface to this software environment.
Please ensure you have a working installation of RStudio
, simply by opening the software. We will not need to access R directly.
R and RStudio
are also part of the University’s SOE which can be accessed using ADAPT. If you would prefer to use your desktop on the University’s ADAPT system as an alternative to an installation on your own laptop, this should be fine. However, the code has not been specifically tested in this environment.
If you plan to use this method, please ensure you can connect and open the software before the workshop.
Once you have R and RStudio
installed, open RStudio
and in the Console
enter the follow commands. You can cut & paste these as a single command.
packList <- c("readr", "dplyr", "ggplot2", "readxl", "reshape2")
install.packages(packList)
Don’t worry too much about all the information that should appear during this process.
In the above we have installed the package dplyr
, which can sometimes be problematic on University-owned laptops. To test that your installation was successful, please cut & copy the following command
all(packList %in% rownames(installed.packages()))
If this returns TRUE
you are good to go.
If the above returned FALSE
take the following actions:
C:\R
Environment Variable
using the steps below called R_LIBS_USER
and give it the value C:\R
RStudio
installed there.System (Control Panel)
Advanced
system settings link.Environment Variables
.New...
R_LIBS_USER
and specify the value C:\R
Advanced
system settings link.Environment Variables
.New...
R_LIBS_USER
and specify the value C:\R