David Robinson bio photo

David Robinson

Director of Data Scientist at Heap, works in R.

Email Twitter Github Stack Overflow



Statistical Computing with R

Welcome to Statistical Computing with R.

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.

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.

  • 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 2 (Monday, March 2):

We’ll be analyzing a dataset about movie popularity. It can be downloaded with this line of code:


Lecture 1/2: 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:


And load the descriptions dataset with: