Course Introduction

 

Welcome to our Introduction to R training course. During this course we hope to introduce you to using R, an interactive environment for statistical computing. R in itself is not difficult to learn, but just like any new language the initial learning curve can be a little steep and you will need to use it frequently otherwise it’s easy to forget.

A few notes about this course. We have tried to simplify the content of this course as much as possible and have based it on 15 years experience teaching (and learning!) R. It is not intended as an introductory statistics course, although we will be using some basic statistics to highlight some of R’s capabilities. Our aim is to help you climb the initial learning curve and provide you with the basic skills to enable you to further your experience in using R. We have included a number of practical exercises for you to work through during the course and encourage you complete these in your own time - you certainly won’t learn how to use R by watching other people do it!

 


FAQ

 

How do I use this website?

How you use this website to support your learning and understanding of R is of course up to you. Having said that here are few pointers that have worked for people in the past. The first thing you will need to do is download and install both R and RStudio on your computer. Take a look at the Setup link on the navbar at the top of this page for further instructions on how to set up your computer and download the required datasets. At the heart of this course is our ‘Introduction to R book’ which you can find by clicking on the R Book link in the navbar. The book is split into 9 Chapters which cover different aspects of using R and RStudio, from general orientation, basic R operations, importing and manipulating data, plotting data, programming in R, R markdown and using version control. You can test your understanding of each of these components by completing the associated exercises which you can find by clicking on Exercises . Solutions to all the exercises are given here. We suggest that you don’t peek at the solutions too quickly and only use them to confirm your answers or if you get stuck and feel like throwing your keyboard out of the window! There are also some additonal resources such as lecture slides we use during our in person courses, short how-to videos walking you through some important topics which you can find in the Resources link. We’ve also created some stand alone tutorials covering topics such as RStudio Projects, R markdown and version control using Git and GitHub which can be found under the Tutorials link. We suggest that you take a look at the tutorials once you’ve finished the core part of this course.

 

What are the pre-requisites for this course?

This course assumes no previous experience or knowledge of using either R or RStudio. It also doesn’t assume any knowledge of programming or using a command-line interface, but if you have some experience, the content won’t come as so much of a shock. But don’t panic. Command-line interfaces and programming languages like R are incredibly powerful and will be utterly transformative to your research. There’s a learning curve, and it’s pretty steep in the beginning, but it’s surmountable and the payoff is worth it!

 

Why are you not teaching us ‘tidyverse’?

We have thought long and hard about whether to teach this course only using the ‘tidyverse’ collection of packages and approaches (if you’ve never heard of ‘tidyverse’ before then don’t worry about it!). Although we do cover the tidyverse package ‘ggplot2’, we decided that it was more important that by the end of the course you have a good fundamental grasp of base R which will provide you with the foundation to go on and learn ‘tidyverse’ approaches in your own time (if you want to). Having said that, if you have previous experience using ‘tidyverse’ then feel free to complete the course exercises using this approach.

 

I don’t like/want to use RStudio

Not a problem. Feel free to use the IDE or script editor of your choice. One of the great things about R is that YOU decide how you want to use it. See Chapter 1 of our ‘Introduction to R’ book for some suggested alternatives.

 

What do I do once I finish the course?

The only way to get more comfortable using R is to use R! We strongly suggest that having completed this course you start using R to summarise, manipulate, plot and analyse your own data as soon as possible. If you don’t have any data yet, then ask your friends/supervisor/family for some (I’m sure they will be delighted!) or follow one of the many excellent tutorials available online (see the resources page for more information). My suggestion to you, is that whilst you are getting to grips with R, uninstall any other statistics software you have on your computer and only use R. This may seem a little extreme but will hopefully remove the temptation to ‘just do it quickly’ in a more familiar environment and consequently slow down your learning of R. Believe me, anything you can do in your existing statistics software package you can do in R (often better and more efficiently).