Production Quality R Code

Production Quality R Code

We offer a large number of different individual modules that can be flexibly combined. We will be happy to support you in putting together your individual training.

As soon as your R code goes into production, it has to meet higher requirements than for purely interactive usage. The following modules help you to professionalize your work with R, write robust, well-tested code, and to automatically produce reliable results.

Module 5.1 R Programming: Functions and Control Structures

Prerequisites: Introduction to R (module 1.1 or equivalent skills)

R is essentially a functional programming language. This means that functions are the central element of software and analyses. In this module we deal intensively with writing functions in R. In addition, we cover control structures such as loops, apply structures, and if-else conditions. We also provide you with useful debugging techniques to make the search for errors as fast as possible.

Duration: approx. 5 hours

Module 5.2 Performance

Prerequisites: Introduction to R (module 1.1 or equivalent skills)

The time your code needs to run can vary widely depending on how it was written. This module covers how to asses runtime; you will be able to find out which part of your code consumes how much time, and how to optimize it.

Duration: approx. 1 hour

Module 5.3 Creating R Packages

Prerequisites: writing R functions (module 5.1 or equivalent skills)

Even for those who don’t plan to publish new tools or methods with R, package development is still highly recommended. The advantages are clear; you can simply pass on your functions to your colleagues or customers. The framework of a package also ensures that all required dependencies are available, and facilitates documentation. Perhaps most importantly, it gives you the possibility to test your code systematically and automatically.

Duration: approx. 6 hours

Module 5.4 Object-oriented Programming

Prerequisites: writing R functions (module 5.1 or equivalent skills)

Object-oriented programming has become the industry standard in software development. R offers various systems to meet this standard. After giving an overview of these systems, we discuss "S3 classes and methods". S3 is not only easy to learn, but also the most frequently used system in R. After taking this module you’ll be able to handle new packages more quickly, and develop intuitive tools by yourself.

Duration: approx. 2 hours

Module 5.5 Continuous Integration and Continuous Deployment

Prerequisites: writing R functions (module 5.1 or equivalent skills), writing R packages (module 5.3 or equivalent skills)

Continuous integration (CI) systems simplify and automate your testing and deployment workflows. Avoid error-prone actions like manual testing and deployment, and let your favorite CI system do the work for you. In this module we will cover the most popular tools, Jenkins and Travis, and make use of their GitHub integrations.

Duration: approx. 3 hours

Module 5.6 Docker Container

Prerequisites: writing R functions (module 5.1 or equivalent skills); experience with writing R packages (module 5.3) is of advantage

Docker lets you abstract from your current operating system, R version, and installed packages to make your code and applications more robust and portable. You will learn how to build docker images with R, and run and debug your code in a Docker container.

Duration: approx. 3 hours