R resources

Never done any coding before? Need to know how to download R and get started? These resources are for you.

On

First steps in R

1. Downloading R and R studio

A guide to downloading R and RStudio, the two pieces of software you will need for working in R.

Download written guide

Download R

Download RStudio

2. Opening R and RStudio for the first time

Here we introduce the RStudio environment and begin to explore the ways in which we can interact with it.

Download written guide

3. Beginning to interact with R

How to enter your first instructions into the RStudio environment.

Download written guide

4. Objects and functions in R

Here we introduce the key ideas of objects and functions in the R environment. We look at how to define objects and call functions.

Download written guide

5. More about vectors

This video continues on from "Objects and Functions" Parts 1 and 2. There is continued discussion of vectors in R, how to define them and different categories of vector.

Download written guide

6. Matrices

The first video defines a matrix is and how to create one in R. The second defines character matrices and spotting errors in the definition of a matrix.

Download written guide

7. Creating Dataframes

Introducing dataframes in R. How to make a dataframe from scratch in RStudio.

Download written guide

8. Installing packages

What a package is and how to install a package to RStudio

Download written guide

9. Swirl

Swirl is a package designed for learning R interactively in RStudio. This video shows you how to install and begin using it.

Download written guide

10. Viewing built-in datasets

How to access and begin to manipulate the datasets in the "datasets" package which is installed by default with RStudio.

Download written guide

11. More objects

A guide to some more types of objects in the R environment.

Download written guide

12. Functions for getting to know a dataset

A quick tour of a few useful functions which help you to get a feel for a dataset in RStudio.

Download written guide

13. Importing data

Video 1: A quick guide to preparing and saving data using an excel spreadsheet before importing it into RStudio.

Video 2: How to get data into RStudio in the form of a data frame once the data have been prepared in an excel spreadsheet and saved in as a CSV file.

Download written guide

14. Where to go next...

The last video in the "First Steps in R" series. This video is intended to show the viewer some resources for continuing their learning of R.

Download written guide


Further R resources

Summarising categorical variables

Summarising categorical variables using charts and tables in R.

Chi-squared test for association

Chi-squared test for association between two categorical variables in R.

Summarising continuous data

Summarising continuous data using summary measures and charts in R.

Checking normality

Guide to checking Normality using plots and tests in R.

Paired t-test

How to undertake the paired t-test in R.

Wilcoxon (matched pairs) signed-rank test

Guide to undertaking the Wilcoxon (matched pairs) signed-rank test in R.

Independent samples t-test

Guide to undertaking the independent samples t-test in R.

Mann-Whitney U test

Guide to undertaking the Mann-Whitney U test in R.

One-way (between groups) analysis of variance

Guide to undertaking the one-way (between groups) analysis of variance.

Kruskall-Wallis test

Guide to undertaking the Kruskall-Wallis test in R.

Two-way (between groups) analysis of variance

Guide to undertaking a two-way (between groups) analysis of variance in R.

Interactions

Guide to dealing with interactions for a single continuous outcome with two categorical independent variables.

Analysis of covariance

Guide to undertaking an analysis of covariance in R.

Repeated measures analysis of variance

Guide to undertaking a repeated measures (within-subjects) analysis of variance in R.

Friedman test

Guide to undertaking the Friedman test in R.

Scatterplots in R

Guide to constructing scatterplots in R.

Correlation coefficient

How to calculate a correlation coefficient between two variables in R. 

Simple linear regression

How to undertake a simple linear regression in R.

Multiple linear regression

How to undertake a multiple linear regression, including checking model fit and reporting the results in R.

Multiple linear regression: Outliers, Durbin-Watson statistic and interactions in regression

A guide to detecting outliers, the Durbin-Watson statistic and interactions in regression in R.

Binary logistic regression

How to undertake a binary logistic regression in R.

Poisson regression

How to undertake a poisson regression in R.

Time series analysis

How to undertake a time series analysis in R.

Multidimensional scaling analysis

How to undertake multidimensional scaling analysis in R.

Principal components analysis

How to undertake a principal components analysis in R.

Sample size power analysis

How to undertake a power analysis to calculate the required sample size in R.

Meta-analysis

How to undertake a meta-analysis including drawing a forest plot in R

Two people sitting at a table looking at some work together
Two people sitting at a table looking at some work together

Book a 1:1 appointment or workshop

Would you like to explore a maths or stats topic in greater depth? Why not book a 1:1 with an advisor or a workshop (current students only).