Getting started with R

R is a free software environment for statistical computing and graphicsTo download R and find documentation and FAQs, please visit The R Project for Statistical ComputingRStudio provides a free open-source IDE, which also serves as a convenient GUI for users. 

All R scripts are available from our public GitHub repository. To see what is available, follow the chapter links below. For each chapter a README is displayed which summarizes the available R scripts. You can download individual files by following the links to the raw versions. You can also download the complete GitHub repository as a zip file.

How to use the R scripts

  1. You will need to have R installed on your computer.
  2. Some scripts require additional R packages. This will typically be indicated in the first few lines of the script by a library statement, e.g. library(qrmtools). Most of the packages we use are available on CRAN (including qrmtools and qrmdata). To install a release version of a package from CRAN a command like install.packages("qrmtools") from inside R will generally work.
  3. The R scripts and packages are under constant development. This might require you to update packages to the latest development versions. For packages developed on R-Forge (development server), this can typically be done with install.packages("qrmtools", repos = "http://R-Forge.R-project.org") . Should there be any problem during the installation, download the source code from this directory and compile. Type ?install.packages at the R command line for more information.

R scripts for the textbook

R scripts for the exercise book