We recommend using R for the homework assignments. Since there are many ways to reach the correct solution, using R is not a requirement. You can certainly use MatLab if you prefer. Or even code everything from scratch (very instructive). However you may find R practical for this course and useful in the future.

Tutorial

Sean Gerrish will give a tutorial on Tuesday 9/02. Same room and same time as the usual tuesday lectures.

Using R at Princeton

You can find copies of R for your personal computer at http://www.r-project.org/. It is also installed on the CS linux machines (e.g., tux.cs.princeton.edu and cycles.cs.princeton.edu ) and the hats machines (hats.princeton.edu).

Sample scripts, data, etc.

  1. The slides of the 2008 tutorial are available here.
  2. An example R script (with comments) can be found here.
  3. The commands used in the tutorial can be found here.
  4. The movies dataset (included in the ggplot2 package) can be found here.

About R

“R is a system for statistical computation and graphics. It consists of a language plus a run-time environment with graphics, a debugger, access to certain system functions, and the ability to run programs stored in script files.”

To properly prepare yourself for the class, the first thing you should do is download and install the program. Familiarize yourself with how to run it. Start working through the Introduction to R (if you actually make it all the way through, you'll be more than prepared). Those of you familiar with Matlab should find transitioning to R fairly easy. But like most systems, the best way to learn is to dive in and start playing around with it.

Summary

  1. High-level introduction to R: what is it good for?
  2. R syntax and data structures
  3. R syntax examples (session)
  4. Graphics in R
  5. Graphics xamples (session)

Useful links

  1. The R Project for Statistical Computing. The main page for the R project.
  2. RSeek.org. A search engine for R related materials.
  3. ESS: Emacs Speaks Statistics. Add-ons for emacs that allow it to interface with R.
  4. An Introduction to R (PDF version available here) A good introduction/tutorial for R.
  5. R Graph Gallery. A gallery of pretty graphs made with R.
 
rinfo.txt · Last modified: 2010/02/09 14:25 by sgerrish
Recent changes RSS feed Creative Commons License DjVu Enabled Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki