Introduction

This one-week course will improve your programming to the level required to pass General Research Skills. Each day consists of about half an hour of explanation and 1–2 hours of assignments.

Structure of This Course

  1. Installation and swirl
  2. Base graphics using plot
  3. Specialized graphics using ggplot2
  4. Reading and manipulating data
  5. The basics of Quarto

The swirl assignment on day 1 is a great way to get used to the basic syntax (like remembering to close brackets). But if we build up your programming skill all the way from the fundamentals, explaining every step along the way, there is no way you could do anything remotely useful after only a week. Also, it would be excruciatingly boring.

Hence, every day after the first, we will begin with an example of something useful you can do in R. I will explain how it works and then it is your job to edit the code provided and make it do something else. In the beginning that may feel a lot like you are just copy-pasting the example. But the more you practice, the more you will feel comfortable actually changing code. At some point, you may even know a fair few functions by heart, but even if you don’t, always keep in mind: It is perfectly fine to search online.

Learning a programming language is similar to learning any other language: You could learn long lists of words and endless rules about grammar (as is unfortunately how language is usually taught in school), but this will never make you fluent in a language, let alone in one week. To speak the language, it is much more efficient to start by learning some useful phrases and building your knowledge from there. The same goes with programming in R: If you know how to make a certain figure, then who cares that you don’t know exactly how it works, or what exactly happens under the hood? If you are able to adjust the code to work with new data, then you can make that figure for any data set!

Examination

This course has no credits, exam or grade. However, during Of course, the things you pick up during this course can be used during the graded assignment of General Research Skills, which is also in R.

In the live version of this course, if time permits, we will go over some student solutions at the end of each day and discuss what works, what doesn’t and why.


This course is a work in progress. Please check back later for updates.