Summary and Setup
This course teaches researchers how to analyse and visualise data effectively using R and RStudio.
You’ll learn to navigate the RStudio environment, organise your work as R Projects, and understand core R concepts including objects, functions, and arguments. We’ll cover data manipulation fundamentals including loading data from files, working with data frames, subsetting data, and handling factors and missing values.
The course introduces the dplyr and tidyr packages for efficient data manipulation. You’ll learn to filter and select data, use pipes to chain operations, create new variables, and apply split-apply-combine techniques for grouped analyses. We’ll also cover reshaping data between wide and long formats and working with dates.
For visualisation, you’ll use ggplot2 to create publication-quality scatter plots, boxplots, and time series plots. You’ll learn to customise aesthetics, apply faceting for multi-panel plots, and build complex visualisations tailored to your data.
By the end of this course, you’ll be able to import, wrangle, analyse, and visualise research data confidently in R.
Software Setup
For this workshop, you will need to install R and RStudio.
R is a programming language and software environment for statistical computing and graphics. The RStudio Integrated Development Environment (IDE) is a set of tools designed to help you be more productive with R.
If you are using a University of Southampton laptop, you should install R and RStudio from the Software Centre. If not, please follow the instructions for your operating system below.
R
R can be found at https://cran.rstudio.com/, from here pick your OS and download the latest release, see below for direct links to your OS.
If prompted, choose to allow downloads from cran.rstudio.com.
https://cran.rstudio.com/bin/macosx/
- For intel based macs choose R-4…pkg
- For ARM based macs (M1 etc.) choose R-4..-arm64.pkg
R is included on many linux distros check to see if it is already present. Else use your package manager (snap, apt, yum), or look at the R for linux download page
RStudio
On the RStudio website, under Direct Downloads (Open Source), select the RStudio download for your operating system.
Download and run the .exe file and follow instructions given by your computer.
Download the .dmg file.
- If prompted, choose to allow downloads from rstudio.com.
- Open the downloaded dmg archive from the Downloads folder.
- Drag the RStudio icon to the Applications folder to install.
Download the appropriate install file (.rpm or .deb) for your distro.