1. R and R-studio

1.1. Introduction

R is a programming language, originally ‘written’ in 1992 by Ross Ihaka and Robert Gentleman (yes, “R” stems from the first letter of their first names), inspired by another programming language called S. By virtue of the active R Development Core Team and a very large and active community of R-users, R has become one of the leading languages for statistical computing (i.e. performing statistical analyses) and graphical display (i.e. making plots and figures). For more information about the programming language R, visit:

Throughout this tutorial you’ll be encouraged to use R-studio. R-studio is a free, open-source “Integrated Development Environment” (IDE) for R (for Windows, Mac and Linux). The R-studio software is widely used by data analysts (including epidemiologists), is well maintained and comes with tons of additional handy features that makes working with R that much easier. For more information on R-studio, visit:

1.2. Download and install R and R-studio

This subsection guides you through the installation steps for R-studio. You can proceed to section 2 when you already have R-studio installed on your system.

Installing R-studio requires only two steps:

  • Download and install “base R” from the R project website. You may have noticed that this installation of base R comes with a simple Graphical User Interface (GUI). We will not be using this interface in this tutorial. For a comparison of the R GUI and R-studio, see section 1.3.

  • Download and install R-studio from the R-studio website (section ‘Installers for Supported Platforms’).

The video guides you through the installation process.

1.3. R GUI versus R-studio

The video below outlines some of the benefits of using R-studio: