Chapter 1 Installation

Date: Start of the year, during the basic mathematics course.

Topic: Programming

Duration: 30–60 min.


Throughout this portfolio, 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 file.

If you can’t knit to PDF, see the note below and try knitting to HTML instead.

Note about TinyTeX

TinyTeX is not required for the portfolio. With TinyTeX, you can knit to PDF. This has several advantages over HTML and Word, which are explained in the second video. For the portfolio, all you need is a working version of RStudio, and to be able to knit to Word.

Note about installation problems

Address installation issues early on. If you’re following this portfolio 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 The RStudio interface

Watch the video on the RStudio interface below.

Question:

As a simple checklist, see if you can do the following:

  1. Create a new R markdown file;
  2. Delete everything that is not the preamble;
  3. Create a new code chunk and write some simple code like 1 + 1;
  4. Run the code.
  5. Try to knit the document to HTML, Word or PDF.

From here on I will assume basic familiarity with the RStudio interface.