R Best Practices

The goal of this training is to build better practices with programming in R, in order to enhance your productivity in research, and to minimize the time you spend on fixing, rewriting and debugging your R scripts.

To achieve this, you will learn how to start using R projects, we’ll look at syntax conventions and debugging tools, and we’ll look into some of what tidyverse has to offer.

Each section starts with a discussion on current practices by the participants of the course, followed by theory and examples, and closes with a discussion on the lessons learned.

The idea is to learn how to create clean, readable, versatile and reproducible R workflows, which help boosting your scientific productivity and collaboration.

Learning outcomes

When you complete this training you will

  • know how to create and use R projects
  • be able to debug your code with R Studio tools
  • know how to make your code reproducible and communicate it
  • have an idea of style guidelines and their importance
  • have guidelines on how to make your code cleaner, more compact and more readable

(And if time allows)

  • know the difference between some useful file formats
  • know about literate programming

Schedule

Total duration: 3 hours

Training materials

Prerequisites

You will need some experience with R. If you bring your laptop with an R (and ideally RStudio installation), you will be able to try out some things live, but it is not necessary.

Trainers