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
You're viewing possible stale or outdated data. Please check the latest semester for more up-to-date information.

Introduction to the Programming Language R

VVZ CR n/a

Last Updated: 2026-02-05 16:30:01

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

The overall objective of this course is to provide an introduction to the programming language R and to build confidence to apply R in other courses. More specifically, the objectives are: - Understand how to import and export data, and how to work with the most important types of R-objects (e.g. vectors, data frames, matrices and lists). - Learn how to create meaningful and visually attractive graphics and apply this knowledge to several datasets. - Learn how to apply several types of important functions (e.g. for- and while-loops, if-else statements, data manipulation). - Understand descriptive statistics and regression analysis and apply this knowledge to analyse several datasets. - Understand the possibilities of analysing and plotting spatial data. - Learn how to write own functions.

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

A script with theory, examples and exercises will be handed out at the beginning of the course. Data for the exercises will be made available via Moodle.

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