E1: Hello R and RStudio
Objective
Get R and RStudio installed and run your first scripts.
- Install R on your computer. On macOS you can install it using the command
brew install R
- Download and install RStudio Desktop Open Source Licence.
You will write R code in RStudio using R Markdown files.
- Get familiar with R Markdown
- Follow all the lessons on R markdown
- 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 likeviridis
, by runninginstall.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:
- 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.
- Compute mean and SD for time for each technique
- (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
---
Submit
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.