Workshop #1: Introduction to R and RStudio

4 November 2016 @ 12-2pm

Background information

For a context on the #smachedavo protest see this.


During the workshop we plan to use this dataset:


The code we plan to use in the workshop is here.

To execute the code with RStudio (to install see here) on your computer you need to

  1. Save the code (which is a simple text file ending with .R) to you computer by downloading and saving this file;
  2. Open RStudio;
  3. In RStudio, open the file you just saved by File and then Open file;

The file with the code file should appear in one of the four panels (usually top-left). on your screen.

You will immediately note that the lines in the code file have two colors: light-gray and dark-gray. Lines that begin with a # are comments and are not actual lines of code. They are there to give you details on the code.

IMPORTANT: To actually execute a line in the code file you need to

  1. Place the cursors on the line (in the code file you just opened is line 4);
  2. and click on the button Run
  3. .