David Robinson bio photo

David Robinson

Director of Data Scientist at Heap, works in R.

Email Twitter Github Stack Overflow



Data Analysis and Visualization Using R (WS1014)

Welcome to Wintersession 1014, Data Analysis and Visualization Using R. The course takes place on Mon/Wed/Fri 1/26-30, from 1:30-3 PM, in McCosh 10. Please make sure to complete the following before coming to lecture:

  • Bring a fully charged laptop,
  • Install the latest version of R (3.1.2), which can be done here. If you already have R installed, make sure your version is the newest one (3.1.2), and if it’s not, upgrade!
  • Install RStudio, which can be found here. Make sure you can open the application, and have it ready at the start of the session.

Course Evaluation

R Live Feed

Ended up a few lines behind? Want to check that your spelling of the last line was correct? No problem: these pages contain the live contents of the files that are being written and executed on the screen. They’re synced by Dropbox and may take a few seconds to get up to date.

  • Piazza: Use this (requires registration) to ask questions with our co-instructor, Dima Gorenshteyn, during the session
  • Attendance: Please enter your netID, along with the “codeword” given, at the start of each session
  • R Error Message Cheat Sheet: contains some common R error messages. If you get an error while running a line that you expect to work (perhaps because you saw it on the screen), check these examples before you go to the Google docs. (In particular, check your spelling and capitalization carefully).
  • My online course A free online course I developed that includes videos and code transcripts for the material covered in this workshop and more
  • Resources for future learning A page of additional resources for learning R

Relevant Code

Lecture 3: We’ll be studying a set of United Nations voting data that can be found here:

  • Anton Strezhnev; Erik Voeten, 2013, “United Nations General Assembly Voting Data”, hdl:1902.1/12379 UNF:5:s7mORKL1ZZ6/P3AR5Fokkw== Erik Voeten [Distributor] V7 [Version]

You can download it using the following line of code:


Note that the codebook with the description of the data can be found here.