Lab 2: R basics

This module contains a PowerPoint file, some R code, and a data fle.

PowerPoint

Stuff that's covered: View your data, sort, subset, and recode. Compute descriptive statistics and export the table to Word. Check data for normality (Q-Q plot, Shapiro-Wilks test), and run a simple simulation that shows the effect of sampling error.

PowerPoint slides.

R code

My university won't let me post many file types, including those with the .r extension. So I will send you to an external server (Github) where you can download the R code.

R code for lab 2 (dowload the Lab 2 file).

Example Data

Comma delimited or .csv file that can be read by R and by Excel.