R Code

Course R code

Code used in class will be posted here. Download to your own computer for use in class.


Setup: Installing R & RStudio

  1. Install R from cran.r-project.org
  2. Install RStudio from posit.co

Class code will be posted here as the course progresses.

Day 1: Getting Started with R

Download these three files and put in their own folder. Assuming you have R and Rstudio installed, start by clicking on the “Project” file.

Week 1 Project

Data (wbdata.RData)

Updated 1_Intro.Rmd

Day 2: R Basics

Class2code.Rmd

Donut Data

Congress Data

Week 3: Gap Minder

Week 3 Project

Class 3 code.Rmd

Week 4: Facing Change and Congress

Class 4 code.Rmd

Facing Change

Congress Data

Week 5: Energy Opinions

5 Concepts and Cleaning.Rmd

energy survey xls

energy survey codebook

Energy Survey

Week 6: Catch Up and WB Data

World Bank Explore

Back Up Data

Week 7: Flying Opinions

Hypothesis Testing

Flying data