This is a basic introduction to programming in R. While there are many courses out there, few take you through the very first steps leading up to writing your first line of code, or WHY you would want to write code at all. This course is designed for people who have never programmed before, or who have never used R before. It will take you through the very first steps of programming, and prepare you for more extensive introductory courses. By the end of this course, you should be able to load data, combine datasets, and produce plots.

There are 8 parts, with various tasks to check your understanding, then a final task. If you've used a programming language before, then you can probably complete this course in a few hours. If you're new to programming, you might need a day to complete. If you've used R before, you could skip to the final task. If you can complete this, then you already know what this tutorial has to offer.

During this tutorial, you will run into errors. This is FINE. It does not mean you are doing something wrong or dangerous, or that you are a bad programmer. You will not lose any files on your computer. Errors just mean that the stupid computer can't understand what you want to do. Remain calm. If you get stuck, you can see the answers to task questions here.

These files are also available in this GitHub repository.

Part 0: Installation and getting comfortable

Part 1: Basics

Part 2: Facing problems and finding help

Part 3: Reading data

Part 4: Processing data

Part 5: Missing values

Part 6: if, for and lists

Part 7: Saving data

Part 8: Final Task


Advanced topics:

Further learning:

You are now ready to learn more about R. You could try: