ASOK15630U Intro to R for Social Data Science

Volume 2020/2021

MA Research Methodology and Practice (MSc Curriculum 2015)

Course package (MSc 2015):

Welfare, inequality and mobility
Knowledge, organisation and politics
Culture, lifestyle and everyday life

Credit students must be at master level

BA-Undergraduates from foreign countries (exchange students) can sign up for this course


The teaching in spring 2021 will be online until the 1. of April due to the Covid19 situation.

As soon as it is permitted and justifiable, it is up to the individual lecturer whether to transition to a blended format or wish to continue with full online teaching for the rest of the semester.

The individual lecturer will inform you of the above choice in the Absalon room for each course.

Courses with oral exams will be held online if the relevant restrictions have not been lifted at least four weeks before the individual exam. This will be notified in Absalon.

Courses with written exams will not experience any changes in relation to the normal exam form.


R is free to use for everyone and powerful. It has become one of the most widely-used programming languages for statistical analyses in the social sciences and is, for this reason, a highly-sought skill among employers. R is probably more versatile than you imagine.

This course will teach you how to do (social) data science with R. You will learn how to get your data into shape, transform and manipulate it, visualize it, and how to statistically model it. The course will also briefly introduce you to logistic regression and multilevel modelling. Apart from these skills that are necessary for conducting classical statistics, you will also learn how to do reproducible research and report your results using R Markdown. Beware that this class presumes that you have a solid background in basic statistics (i.e., descriptive statistics and multiple OLS regression).

Learning Outcome


  • R programming language
  • R Studio
  • R Markdown


  • Students will be able to conduct statistical analyses with R.
  • Students will be able to program their own R functions, loops and so on in R.
  • Students will be able to prepare presentations and reports with R Markdown.



  • Students will increase their analytical and logical cognitive capacities.
  • Students should be able to transform and manipulate data to prepare it for statistical analyses. They will be able to think about data in less narrow way, because R is more flexible than other statistical programming languages.
  • Students should be able to conduct own research based on analyses for which they use R.
  • Students should be able to prepare reproducible research reports and presentations with R Markdown.


The course is largely based on: Grolemund, G. & Wickham, H. (2017): R for Data Science. O’Reilly. This book is freely available at:


Other useful books are:

Matloff, N. (2011): The Art of R Programming. No Starch Press

Teetor, P. (2011): R Cookbook. O’Reilly.

This course is no introduction to statistics! I expect that students have a solid background in basic statistics. They should have a thorough understanding of linear regression (OLS) with dummy variable predictors and interaction terms. This is a prerequisite.
Lectures, class assignments, student presentations, a final paper that consists of an empirical analysis reported using R Markdown. Students are expected to contribute actively.
Students will need to bring their own laptop.
  • Category
  • Hours
  • Lectures
  • 28
  • Preparation
  • 107
  • Exam
  • 71
  • Total
  • 206
Continuous feedback during the course of the semester

I give structured feedback to student presentations, and the final paper. Solutions to the class assignments will be presented as well.

7,5 ECTS
Type of assessment
Written assignment
A written take-home essay is defined as an assignment that addresses one or more questions. The exam is based on the course syllabus, i.e. the literature set by the teacher. The students will need to write a dynamic R Markdown document analysing the European Social Survey, the Party Manifesto, and another data source.

The written take-home essay must be no longer than 10 pages. For group assignments, an extra 5 pages is added per additional student. Further details for this exam form can be found in the Curriculum and in the General Guide to Examinations at KUnet.
Exam registration requirements

Sociology students must be enrolled under MSc Curriculum 2015 to take this exam.

Credit students must be at master level.

Exchange students can be at both bachelor and master level.

Marking scale
7-point grading scale
Censorship form
No external censorship
Exam period

Submission dates and time will be available at KUnet,
Exchange students and Danish full degree guest students please see the homepage of Sociology; under Education --> Exams



Written assignment with one or more NEW questions.

Criteria for exam assesment

See learning outcome.