Announcements

  • Quiz 1
  • Consider the following example in R:
library(dplyr)
example <- data_frame(
  num = c(0, 0, 0, 1, 1),
  char = c("0", "0", "0", "1", "1"),
  factor = factor(c(0, 0, 0, 1, 1))
  )
View(example)

Whoa whoa? How do we tell the difference between these values? (Note: a factor is how R codes a categorical variable.)

Use str(example) (for “structure”) or dplyr::glimpse(example)

In-Class

  • Slides: Introducing the “Grammar of Graphics” i.e. constructing statistical graphics much in the same the way you construct sentences in any language using grammar
  • In-class exercise:
    • Packages to install: ggplot2
    • Code: Lec04.R

After-Class Updates