VVZ API is not affiliated with ETH Zurich. Data might be outdated or incorrect. Please view the official ETHZ Vorlesungsverzeichnis for binding information.

103-0378-00L 3 Credits MSC D-BAUG

Introduction to the Programming Language R

VVZ CR n/a

Last Updated: 2026-06-01 11:31:29

Abstract

R is one of the most popular programming language in science and practice for data analysis, modelling and visualisation. In this course, you will learn the basics of R and some common applications of R, such as making plots, regression analysis and working with spatial data. The weekly computer labs start with a short lecture followed by exercises that have to be handed in to pass the course.

Objective

By the end of the course, students will be able to: - import, export and structure data using core R objects such as vectors, data frames, matrices, and lists. - create and customize meaningful and visually appealing graphics and apply them to real datasets. - use control structures such as for- and while-loops and if-else statements, and perform basic data manipulation. - apply descriptive statistics and linear regression models to analyze datasets and interpret the results. - analyze and visualize spatial data using relevant R tools. - write custom functions to automate tasks and structure code efficiently.

Content

The course has a strong focus on “learning by doing”. During the weekly computer lab sessions, students will be given an introduction to the programming language R. Each lab session will start with a short introductory lecture, after which students work through the script and complete the exercises. During the lab sessions, the lecturers will be available to answer individual questions. The main topics that will be covered in the lab sessions are: - importing and exporting data - types of R-objects - data scraping - plotting data - descriptive statistics - data manipulation - conditionals and loops - regression analysis - plotting and analysing spatial data - writing own functions In the 7th and 14th week of the course, students have the time to finish the exercises that should be handed in at the end of those weeks.

Resources

Lecture Notes

Lecture notes and slides can be found on the Moodle page of the course.

Literature

Optional supplementary reading is the book: Venables, Smith & R Core Team (2021) An Introduction to R. This book can be downloaded for free from: https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf .

General Information

Language
English
Levels
MSC
Frequency
Yearly recurring

Examination

Type
ungraded semester performance
The course script contains exercises that need to be handed in after the 7th and after the 14th course week. The course is passed after a positive evaluation of these exercises.

Registration & Places

Priority: Registration for the course unit is only possible for the primary target group

Course Components

Type Title Time & Place Hours
lecture with exercise Introduction to the Programming Language R
  • Wed 09:45-11:30 (HIL B 18.1)
2 h weekly

Offered In