Overview

R is a powerful and open source statistical computing and graphical language and environment. The goal of this tutorial is to give a concise introduction to R and is aimed at Civil and Environmental Engineering undergraduate and graduate students. This tutorial is by no means comprehensive. There are several very good detailed sources for R. Some of the popular R books are:

There are also several free resources available. I highly recommend reading the ``Introduction to R’’ pdf document which comes with the R installation. There are also several youtube videos and courses on MOOCs on using R for data analysis.

Note

If the figures in this tutorial appear too small or too big, try a different browser. If the formatting appears odd on multiple browsers, send me an email and I will do my best to fix the issue.

Installing R and R Studio

This section provides instructions for installing R as well as RStudio.

Installing R

  • Go to the webpage: http://cran.cnr.berkeley.edu/
  • There are three links on the webpage:
    • Download R for Linux
    • Download R for MacOSX
    • Download R for Windows.
  • The rest of the instructions assume that you have a windows operating system
  • Click on Download R for Windows link.