Lecturer: Peter Gruber.

Preliminary workshop: 13 - 14 August 2021.

It is free of charge for participants attending a regular workshop; it can be booked by itself for a fee (200CHF).

Course Description
This module is an introduction to the programming language R for students with little or no experience in this language. The goal is to provide the minimal computational foundations for using R in the specialized courses of the Summer School in Social Science Methods.

Course Objectives
After this course, students will be able to set up the Rstudio environment and to use the R language for preparing, cleaning, organizing and merging datasets. They will be able to calculate simple descriptive statistics and perform basic regression analysis. They will
understand the structure of the R language to be to use R in the specialized courses of the Summer School in Social Science Methods.

Students are expected to have basic computer and statistics skills. No programming knowledge is required. Students are expected to complete an online tutorial before the beginning of this bootcamp. Students are expected to bring their laptop with R and Rstudio
installed. (There will be a remote session on how to install the software approx. 1 week before the bootcamp if students request it).

Methods & Course Work 
The course is organised as a 2-day bootcamp. Online participation will be possible. On each day, there will be seven hours of teaching:

  • two teaching units of 1.5hours in the morning
  • two teaching units of 1.5hours in the afternoon
  • one exercise unit of 1 hour late afternoon
  • Students are expected to complete an online tutorial in the week before the beginning of this bootcamp on their individual schedule.

The teaching methodology will be based on realistic data sets and take students from theory to mastery in four steps:

  1. Lecture with presentation of new concepts
  2. Guided tour of R: students and professor work together on applying the new concept
  3. Short rationalization of the lessons learned using R
  4. Individual exercises with possibility to ask questions

There is no exam and no grade.

Class material
All slides, sample programs, sample datasets and solutions to exercises will be made available digitally. It is also planned that all students receive a complementary 6-month subscription to datacamp.com (subject to availability).

Detailed Lecture plan
1. Getting started and getting organized
    The Rstudio environment, the logic behind R, first steps with R, variables, operators
2. Importing and organizing data
    File formats, R data.frames and other data structures, the read.xxx commands, summary statistics
3. Extending R
    How to use functions and how to install packages for data import via APIs
4. Spreading the word
    Simple graphs, how to create a report in Rmarkdown and publish it on the web
5. Working with data
    Subsetting, partitioning, merging and aggregating; applying a function by partition
6. True or false
    Formulating conditions via logical operators and logical variables
7. Stealing from the web
    An introduction to scraping
8. Simple models
    A simple regression model: set up, results, interpretation