# 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:

- R in Action: Data Analysis and Graphics with R by Robert Kabacoff: https://www.manning.com/books/r-in-action-second-edition
- R for Everyone: Advanced Analytics and Graphics (Addison-Wesley Data and Analytics) by Jared P. Lander: http://www.jaredlander.com/r-for-everyone/
- Advanced R (Chapman & Hall/CRC The R Series) by Hadley Wickham: https://www.crcpress.com/Advanced-R/Wickham/p/book/9781466586963
- R Graphics Cookbook by Winston Chang: http://www.cookbook-r.com/Graphs/
- ggplot2: Elegant Graphics for Data Analysis (Use R!) by Hadley Wickham: http://www.springer.com/us/book/9780387981413
- The Art of R Programming: A Tour of Statistical Software Design 1st Edition by Norman Matloff: https://www.nostarch.com/artofr.htm
- An Introduction to Statistical Learning with Applications in R by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani: http://www.springer.com/us/book/9781461471370#aboutBook

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.