Data transformation with R tidyverse

Dec 2026 Three days, Belval Campus, Luxembourg Register here

Overview

This three half-day training course provides an introduction to data transformation (“data wrangling”): the process of preparing raw data for analysis.

Data wrangling includes cleaning (handling missing values, removing outliers), restructuring (consistent naming of variables, formatting), calculating derived variables, and generally ensuring we have consistent, well-organised data.

Data wrangling will often be the most time-consuming part of any analysis and it is a fundamental aspect of bioinformatics.

Successful completion of the assignments will be awarded with 1 ECTS.

Course objectives

By the end of this course, participants will be able to:

  • Manipulate tabular data with an expanded set of dplyr verbs: filter, arrange, select, mutate, and group/summarise rows and columns, including across(), case_when()/case_match(), and where()
  • Reshape data between wide and long formats with pivot_longer() and pivot_wider() to reach tidy data
  • Combine multiple tables using mutating and filtering joins, and understand when to use these joins
  • Work with text using stringr and regular expressions (metacharacters, quantifiers, anchors, character classes, escaping)
  • Manage many models at once with list-columns and nesting (nest(), broom::tidy/glance), and extract tidy results from complex objects
  • Work reproducibly using projects, Quarto, and git/GitHub for versioning and practical submission, and communicate findings with intermediate ggplot2 graphics.

Course outline

Day 1: Foundations, Gapminder, strings

  • Course orientation, reproducible workflow recap, and responsible use of LLMs for coding
  • Introduction to the Gapminder dataset: exploring the data and setting up list-columns to keep related things together
  • Strings with stringr: detecting, extracting, locating, splitting, joining, padding and trimming
  • Regular expressions: metacharacters, quantifiers, greedy vs. lazy matching, anchors, character classes, and escaping metacharacters

Day 2: Data wrangling and visualisation

  • dplyr: rows (filter(), distinct(), arrange()), columns (select(), rename(), relocate()), and mutate() / group_by()
  • tidyselect helpers, Boolean logic for column selection, and avoiding selection by index
  • Column transformation at scale: vectorised if_else(), case_when()/case_match(), acting on many columns with across(), lambdas, and predicates via where()
  • Intermediate ggplot2 — beeswarms, scales, labels, themes, and statistical layers

Day 3: Reshaping, joining, and programming for data science

  • Reshaping with pivot_longer() / pivot_wider()
  • Joining tables: mutating joins, filtering joins, and inequality/rolling joins with closest()
  • Managing multiple models with nesting: fit a model per group, explore list-columns, and tidy results with broom
  • Helpful tools: pull(), lead()/lag(), when to reach for data.table on bigger data, and animation with gganimate

Prerequisites

You should have some prior experience with programming in R (or have attended the “First steps with R” course) and have a basic knowledge of statistics.

The course will be held on-site in December.

Requirements

  • Have a computer ready with a recent version of R (4.5.0 or later) and RStudio (1.2 or later) installed. You will receive instructions and support for setting up your computer in advance of the workshop.

Instructors

Roland Krause

Tyler McInnes

Eléonore Schiltz

Registration

Registration will open is now open.

Address

The workshop will be held at:

University of Luxembourg Belval campus Esch-sur-Alzette

Contact

Roland Krause

Roland Krause (LCSB, Elixir-Luxembourg)