R is a computer language that is useful for data analysis, statistical computing, and data vizualization. Unlike its expensive competitors like STATA, R is free to download under the GNU General Public License. You can check out the R Homepage for more information.

While you can create and run R scripts directly in a command line setup after downloading R as a standalone product, it is far easier and more robust to use RStudio, an interface environment (or "skin") for writing R code. If you ran the CRON scripts on your machine, R and RStudio are both already installed. If not, download instructions for both R and RStudio are includeded in Tutorial 1 below.

Developed by Jeff Rosenblum for the Spring 2015 11.220 QR course, this tutorial series will take you through many of the basic data analysis and statistics tools that R provides. Each link will download a zipped folder containing a PDF of the tutorial and a CSV of the data used therein. In some cases, due to a weird glitch when printing PDFs of R scripts, some text has been cutoff. In these cases, an R-Markdown file (which can be opened directly in RStudio) has been included.

- Getting Started
- Survey Analysis
- Reference Class Forecasting
- Central Limit Theorem
- Regression
- Difference in Difference
- Regression Diagnostics

The following are additional PDF resources for the basics of R and some of its most popular packages.

- An Introduction to R
- A (Very) Short Introduction to R
- R for Beginners
- R for Advanced Beginners
- An R Introduction to Statistics (web link)
- RMarkdown Cheatsheet
- GGPLOT2 Cheatsheets
- Using Latex in R

Tutorials and Resources prepared by Jeff Rosenblum

Return to DUSPviz tutorials page