R for Psychologists

I will be teaching this again starting December 1st @ 2pm in Muen D334. RSVP by email.
I've previously taught this workshop as CLIPR TA in the Fall and Spring of 2013 and the Fall of 2014.

The series was designed to give a succinct introduction to R, highlighting the essential methods needed for data analysis. I placed a heavy emphasis on add on packages that improve functionality from base R. Given the variety of ways to accomplish the same goal in R, that often confuse the novice, I focused on a few hand-picked packages that follow best practice guidelines and are particularly helpful for the types of data often seen in psychology. This short workshop should allow you to get up and running in R quickly and efficiently. This workshop is aimed at people with prior experience in data analysis but with little experience in R. If you have no data analysis experience, I reccomend a more thorough introduction so you can understand why the methods I emphasize are important.

  1. Introduction
    What is R and why would you want to use it? What are the basic data types and how do you manipulate them? How do you access, load and manipulate data?
    Slides | Excercise
  2. Data wrangling: Reshaping, Splitting and Merging
    Want to pull your hair out changing the format of your data in Excel? Wish you knew how to explore your data better? Here we cover how to easily go from wide to long format using reshape2, use split-apply-merge techniques to summarize data using plyr and other tips and tricks to make dealing with your data easier using R.
    Slides | Excercise without answers | Excercise with answers | Data for excercise
  3. Linear models, contrast codes and plotting with ggplot2
    The basics of running a linear model, setting up contrast codes to test a specific model and how to plot the results in R. We will be using the lm function for linear modeling, the recode function from the car package for contrast coding, and mainly ggplot2 for plotting.