## Contact

### Department of Statistical Science

Physical Address:
Brink Hall 415A

Mailing Address:
875 Perimeter Drive, MS 1104
Moscow, ID 83844-1104

Phone: 208-885-2929

Fax: 208-885-7959

Email: stat@uidaho.edu

## Introductory Material

The Undergraduate Guide to R

An introduction to R appropriate for a complete beginner, by Trevor Martin at Princeton University.

## Loading data into R

Quick-R: Importing Data

Examples from a variety of common file/data types.

R Data Import/Export Manual

A manual from cran-R, which is much more expansive and detailed, this is better from someone looking for depth or troubleshooting loading data.

## Installing and loading libraries

Installing Packages in R (Youtube video)

A detailed introductory guide by MarinStatsLectures, Mike Marin and Ladan Hamadani.

## Converting from wide to long data frame format in R

Cookbook for R: Converting between Wide and Long Format

Gives examples for gather(), spread(), melt() and others as ways to combine or separate rows/columns of data.

## Looking at and Manipulating Data in R

R Tutorial: Data Frame

A short example of how to make and call values from a data frame.

R Programming II: Data Manipulation and Functions

Slides by Dr. Denise Ferrari with a broad introduction to data in R, includes basic examples. (UCLA)

Cookbook for R: Manipulating Data

An index of links to data manipulation tutorials with examples.

## Aggregating data

Cookbook for R: Summarizing Data

Explanation of several methods for aggregating and summarizing data, with examples.

One detailed example, posted by Dr. Dave Tang.

Help page for 'aggregate' function in R

Describes options for the aggregate function, with several basic examples.

## Graphs/Figures

Quick-R: Graphs

Quick tutorials with examples for a variety of plots, assumes a small amount of previous R knowledge

Basic Plots

This tutorial shows how to create histograms, box plots, and scatter plots (as well as a couple other plots).

## Creating functions in R

Programming with R: Creating Functions (Github)

A code-based example that assumes some prior knowledge.  Better if you prefer to work through code rather than reading text. (Software Carpentry)

Nice R Code: Functions

A text-based guide to functions in R. (Dr. Rich FitzJohn and Dr. Daniel Falster)

## Linear models in R

R Workshop: Linear Regression

A good step by step example of regression that also has some basic R introduction material. (Harvard)

Linear models and linear mixed effects models in R : Tutorial 1

An extensive tutorial with a mix of code and explanations, this also has a sequel covering mixed effects models. (Dr. Bodo Winter)

## General Resources

An Introduction to R

Introductory R manual by cran-R.

UCLA R Resources

## Contact

### Department of Statistical Science

Physical Address:
Brink Hall 415A

Mailing Address:
875 Perimeter Drive, MS 1104
Moscow, ID 83844-1104

Phone: 208-885-2929

Fax: 208-885-7959

Email: stat@uidaho.edu