Chapter 1 Installation & Tutorial

Throughout this course, we will use RStudio. To use RStudio, you need to install both R and RStudio.

(Even if you have an existing version, I recommend getting the latest version using the guide below.)

1.1 Installation Guide

If you’re comfortable with computer software, it boils down to:

  • Install R;
  • Install RStudio;
  • Open RStudio and try to knit a template R markdown or Quarto file.

Note about installation problems

To ensure a smooth experience throughout the course, address installation issues early on. If you’re following this course in the context of your biology education at Leiden University, you can always contact Dr. H.G.J. van Mil or me about installation issues.

Otherwise, see the general tips below, or try asking a question on Stackoverflow.

Some general tips that will save you a lot of headaches with software during your education:

1.2 About RStudio & R Markdown

Watch the video on the RStudio interface below.

1.3 About the R Language

There are two great tutorial for learning the basics in R. This video shows how to use them:

1.4 Tutorials

Every day there will be exercises in RStudio to teach you how to program, how to run your own analyses and how to interpret output.

The optional exercises are for those who want to improve their statistics beyond what is required to pass the course.

1.4.1 Exercise: swirl

Watch the part about swirl and complete chapters 1, 2, 4, 7 & 8 from the R Programming course.

1.4.2 Exercise learnr (optional)

Many data scientists prefer the tidyverse over base R. This is a collection of packages aimed at writing code in a more ‘tidy’ manner, using the pipeline notation.

Complete the Data basics, Filter observations, Create new variables and Summarise Tables chapters from the learnr package as explained in the video.

(If you don’t see a Tutorial tab, try running install.packages("learnr") in the console and then restart RStudio.)


From here on out, I will assume basic familiarity with R syntax and the RStudio interface.