E1: Hello R and RStudio


Get R and RStudio installed and run your first scripts.

  1. Install R on your computer. On macOS you can install it using the command brew install R
  2. Download and install RStudio Desktop Open Source Licence.

You will write R code in RStudio using R Markdown files.

  1. Get familiar with R Markdown
  2. Follow all the lessons on R markdown
  3. Run several examples of Rmd files provided in the lessons. For example, open this file and press the Knit button at the top of the interface. Note that the first time you run Knit, it will ask you to install a lot of packages. Install them. In addition, to run the previous example, you will probably need to install additional packages like viridis, by running install.packages('viridis') in the RStudio console.

Now get familiar with R syntax by reading chapter 2 of Modern Statistical Methods for HCI.

Create your first Rmd file. Find the R commands to:

  1. Load the CSV file techniquesTime.csv. This file contains the task completion time in ms for two interaction techniques (techA and techB) with 10 participants.
  2. Compute mean and SD for time for each technique
  3. (BONUS) Create a bar plot showing the mean time for each technique

The first lines of your script should contain the title, author and output:

title: "CS889 - E1"
author: "Gery Casiez"
output: html_document


Follow the submission instructions on the course information page. Provide the Rmd file and its html output for the last 3 steps detailed above. In your solution notes, provide your operating system, any problems you ran into, and the main resource(s) you used (blog posts, online tutorials, stackoverflow posts, papers, textbooks, etc.). These resources should have brief descriptions of what the resource is and how it helped you.