Step 2: Install the packages

Step 2 of 5

Before you start: Step 1 finished, and RStudio open. When you finish: the packages installed, and a check that says your laptop is ready.

There are no files to download. Both lines below run straight from this site.

There are 2 things to do on this page, and a third only if something fails.

1. Install the packages

  1. Open RStudio.
  2. Click once inside the Console pane, on the left.
  3. Copy the line below. Paste it into the Console. Press Enter.
source("https://drarunmitra.github.io/iisc-epi-shortcourse/setup/install_packages.R")
  1. Leave the computer alone until it finishes.

You should see: lines of text scrolling past, naming each package as it installs. You are finished when the > prompt comes back and stops moving.

On a first run this takes a while. Start it and go and do something else.

If it does not work: if R asks Do you want to install from sources the package which needs compilation?, type n and press Enter.

WarningDo not interrupt it

Close RStudio part way through and some packages are left half-installed. The line above installs only what is still missing, so run it again and let it finish.

Red text in R is not always an error. Most of it is ordinary progress output.

2. Run the check

  1. Click once inside the Console pane.
  2. Copy the line below. Paste it into the Console. Press Enter.
source("https://drarunmitra.github.io/iisc-epi-shortcourse/setup/check_setup.R")

You should see: a line for each check, then this:

You are ready for 21 September. See you at IISc.

If it does not work: read Troubleshooting first. Then read the line that starts with a cross; it names the fix.

Symbol Means
✔ that check passed
! a warning; usually fine, read the text
✖ that check failed; fix this one

3. Email us if anything failed

Only if you saw a cross.

  1. Select the whole check output in the Console and copy it.
  2. Email it to office.msicph@iisc.ac.in.
  3. Say which operating system you use, and its version, and paste the output of sessionInfo().

You should see: the email in your Sent folder.

If it does not work: paste the output as text, not as a screenshot. We cannot search a picture.

NoteWhy this matters

R on its own does very little. Packages do the work. The script installs 16 of them, plus everything they depend on.

The check tests behaviour, not only what sits on disk. It runs epitools on a 2×2 table with a known answer. A broken install fails now, not in front of the class.

Tell us about a failure early. A problem we see on Wednesday is a working laptop by Friday.

Step 2 is done

→ Step 3 of 5: the R primers

Back to top