Introduction to R (with tidyverse)

Available Dates

No public dates currently available for this course

R is a specialised programming language whose main purpose is the maniupulation, visualisation and analysis of datasets. It is one of the core tools used in many numerical disciplines and is very popular in the field of bioinformatics.

This course provides a ground-up introduction to the core R language, and uses the modern tidyverse framework to show how to easily import, transform and plot datasets.

This course is an invaluable foundation for anyone wanting to use R in their work.

Pre-Course Requirements & Suggestions

This course makes no assumption about specific skills or knowledge

Course Content

(click to expand each section)

In this session we introduce the R interpreter and the RStudio environment and show how you can use these to execute commands in R. We start with simple mathematical statements but move on to show storage and retrieval of data from variables and the use of functions.
Here we introduce the biggest concept in R: vectors. These are the basic unit of data storage in R and represent an ordered set of data of the same type. We show how to create vectors manually and through the use of specialised functions and operators. We show how vectorised operations can be used to easily perform large scale calculations and transformations on your data.
Moving on from vectors we look at some more complex data structures in R and how they can be used to model your data. We look at the Tibble as the standard 2D datastructure we'll be using. We introduce the 'tidyverse' and how it supplements the functionality of the core R language and we look at some tidyverse function for reading data from text files into tibbles.
We will look at the standard way that tidyverse manipulates data using the select and filter functions. We will look at the standard design for all tidyverse functions which manipulate data.
Now that we know how basic data manipulations are performed in tidyverse we can look at scenarios where we want to chain multiple operations together. We will show how the new pipe operator, along with the design of tidyverse functions makes this kind of operation chaining really simple and scalable.
In tidyverse, ggplot2 is a full plotting library which offers many improvements over the core R plotting functions. We introduce the core ggplot concpets of aesthetics and geometries and show how to build and customise your first plot.
We will look at some more aesthetics for drawing barplots and plotting distributions. We'll get ggplot to calculate some aesthetics for us rather than supplying them directly. We'll finish by looking at some more options for customising the default plots.