103-0378-00L  Introduction to the Programming Language R

SemesterAutumn Semester 2021
LecturersM. J. Van Strien, A. Grêt-Regamey
Periodicityyearly recurring course
Language of instructionEnglish


AbstractR 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.
Learning objectiveThe 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.
ContentThe 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.
Lecture notesA 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.
LiteratureOptional 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.
Prerequisites / NoticeNo prior knowledge of R or any other programming language is required for this course.
CompetenciesCompetencies
Subject-specific CompetenciesConcepts and Theoriesfostered
Techniques and Technologiesassessed
Method-specific CompetenciesAnalytical Competenciesassessed
Decision-makingfostered
Media and Digital Technologiesfostered
Problem-solvingassessed
Project Managementfostered
Social CompetenciesCommunicationfostered
Cooperation and Teamworkfostered
Customer Orientationfostered
Leadership and Responsibilityfostered
Self-presentation and Social Influence fostered
Sensitivity to Diversityfostered
Negotiationfostered
Personal CompetenciesAdaptability and Flexibilityfostered
Creative Thinkingassessed
Critical Thinkingassessed
Integrity and Work Ethicsassessed
Self-awareness and Self-reflection fostered
Self-direction and Self-management fostered