Getting started with R, 1 credit

R för nybörjare


Language of instruction: English
Course period: January 18-20, 2023, 9-16 each day
Campus teaching or online teaching: To be decided


MSc in natural sciences or related field, experience/education in basic statistics.


This course aims at introducing the command-based statistical software R, one of the most widely used, and highly versatile, statistical programs in natural sciences and related fields. Learning outcomes: After this course, students

  • are able to conduct basic statistical analyses in R, including deciding which analysis to use and how to interpret the results
  • can write the associated R code and perform basic programming steps, and
  • know how to approach learning more advanced statistical methods in R.

This course also enables students to use R independently in Göran Arnqvist´s course "Modern statistics in natural sciences". "Getting started with R" can be taken by itself or just before "Modern Statistics..." (course times are coordinated).


Teaching the use of R for independent statistical analyses as well as the selection and critical evaluation of statistical methods is associated with the following three PhD examination goals (Högskoleförordningen, bilaga 2, Examensordning 2006:1053):
För doktorsexamen ska doktoranden

  • " förtrogenhet med vetenskaplig metodik i allmänhet och med det specifika forskningsområdets metoder i synnerhet. " (Kunskap och förståelse)
  • " förmåga till vetenskaplig analys och syntes samt till självständig kritisk granskning och bedömning av nya och komplexa företeelser, frågeställningar och situationer "(Färdighet och förmåga)
  • " förmåga att kritiskt, självständigt, kreativt och med vetenskaplig noggrannhet identifiera och formulera frågeställningar samt att planera och med adekvata metoder bedriva forskning och andra kvalificerade uppgifter inom givna tidsramar och att granska och värdera sådant arbete" (Färdighet och förmåga)


The course covers: Data loading and manipulation, R command structure, common basic statistics (for example, correlation, ANOVA and regression), graphs (barplots and scatterplots), and a brief introduction to programming structures.


In this course, students are first introduced to a topic and then spend most of the course time on independent solving of exercises. Exercises are designed to be challenging and ask students not only to write R code but also to make their own analysis decisions and to critically evaluate methods. Coding can be difficult but is best learnt by practice. We encourage learning and understanding by asking students to work at their own pace (continue earlier exercises later if needed) and by providing extensive individual help during the exercises with one assistant per 5-6 students. Once students are done with an exercise, we have full solutions available allowing students to self-correct their results and to get more coding input. These measures encourage students to work freely until they understand what they are doing as they do not have to worry that they would get completely stuck with coding or miss something if they need more time. The target teaching atmosphere in the exercises is one of high concentration among the students with some consulting with teachers in quiet voices (or digitally), a longer while into the exercise session students can sometimes be heard bursting out into "yes! now it works !".

Structure: The course consists of six half-day sessions, each composed of a lecture/demonstration (1h) and associated exercises (2h). Exercises focus on realistic analysis steps and involve real datasets. Students are encouraged to work at their own pace throughout the sessions. During the practice time students have access to individual help from myself and 2-3 assistants, depending on student number. Exercises are designed to encourage independent thinking (rather than repetition). 


Attendance in 5 out of 6 sessions.


Sophie Karrenberg,


Department of Ecology and Genetics


Sophie Karrenberg,


Submit the application for admission to:
Submit the application not later than: 2022-12-15

Last modified: 2022-11-02