I’ve been showing some output in R to a class who learnt some other statistical software, and one of the student’s e-mailed me to say “I was hoping to go through the example you did for the statistics seminar questions on R but I am unsure on how to download the software”

*I thought I’d post the reply here in case it’s useful to others- and I’d be very intrigued to learn what other statistics lecturers would recommend to someone who knows some statistics but hasn’t learnt R yet. I searched the internet for easy guides, but everything is either very complex, assumes too much knowledge, or is focused on programming/data science which is perhaps too much for a short statistics course.*

## 0. What is R? Do I need to use R?

R is a statistical programming language. It has grown really popular in recent years because it is relatively easy to use (at least compared to C++, Java, etc), and is very powerful in doing statistics and data science. There is a big R user base, and it is possible to find a package (R’s term for an add-on) that can do just about any statistical task.

Python is also popular, but I think a bit more difficult to get started with. Most statisticians use R, and python is more popular with the data science community, but there are a lot of overlaps.

I think it would be worth your while to put some time into learning R. If you do any kind of statistical analysis in the future, it will help you with your future career. There are very few statisticians/data scientists that don’t use R and/or Python these days.

## 1. Downloading R

R is free, open source, software. There is also an “add-on” to R, which is almost essential these days, called R Studio. R Studio is technically an integrated development environment (IDE), but really just provides a nice way of accessing R. You need to download both bits to work:

First Download R here: https://cran.ma.imperial.ac.uk/

First Download R Studio here: https://rstudio.com/products/rstudio/download/#download

(R will work on just about any operating system, including Windows, Mac OS, and Linux)

## 2. Getting started with R

There are a number of options which are part of **paid programmes**: Many students have found Codeacademy a great place to get started with R. It’s a very user-friendly way to get started with guided exercises to take you through those first steps, and the system will check your code as you go along to make sure you’re on the right track. Datacamp and other sites have similar features, although the bad news with all of them is that many of the advanced features you will have to pay for. Codeacademy seems to have more good frree stuff, and it’s not a huge amount of money, so for visual learners it might really help! Many of the big learning platforms also have full courses you can sign up with, such as coursera and LinkedIn Learning. Many universities and businesses have subscriptions to these platforms, so it’s worth checking if yours does.

If you really want to **keep things free**, a good place to start with R is reading the **introduction to R manual **which of course is free. One thing that often helps students is to work through the Appendix A first, which has a sample session; just type in the commands to the (bottom left) window in R studio line by line

The manual is a little dry, and I know some people prefer videos, so this is a fairly good video introduction to a lot of the statistical features of R.

For those that like a **textbook,** many students like this one:

Statistical Analysis with R For Dummies (not that any of you are dummies! ) is a nice introduction to R focused on statistics.

**Lecture Notes:** There are lots of courses available from universities, and other organisations. This is one of the clearer, more statistically focused ones https://dereksonderegger.github.io/teaching/stat-4445—introduction-to.html

Those are just some suggestions- please do add your own in the commentsto help other students. One of the best things about R is that there is a large user community- but it does mean that there’s a lot of good stuff and a lot of bad stuff out there.