Lecture 3: Introduction to R

Outline:
  1. Review of terminology
  2. Basic operation of R
  3. Start with some simple data analysis

Review:
Goals:
  • Feel comfortable with basic operation and programming in R (scripts, workspaces, execution, etc)
  • Understand basic data representations and how to work with them (extracting, transforming, recombining)

Introduction to R:  R is a programming language and a programming environment. 

Data topics:
  • Table or spread sheet as the data model
  • Basic plotting and bar charts
  • Percentages versus incidence rates versus counts
Example datasets:
  • airmiles (time series - simple)
  • sunspot.month (time series - more complicated)ex
  • PlantGrowth (data frame)
  • airquality (data frame)

Look at some real data:

In class exercise:
  • Download the data by race and ethnicity
  • Read it into R
  • Plot it using barplots.