Common questions on HW1

  1. R Studio freezes.

  2. Break long code into multiple lines.

What’s the result of following R code?

x <- 1 + 2
  + 3 + 4
x

How about?

x <- 1 + 2 + 
  3 + 4
x
  1. Pass string arguments to R from command line.

  2. Wifi UCLA-Web blocks port 8787 used by R Studio server.

About debugging

  • Remember: it’s always always you, never the computer.

  • Be systematic. Build on incremental changes.

  • Be sure it’s fixed, running without an error is not fixed!

  • Be tenacious, you’ll find it … eventually.

Tips on HWs

Questions from last lecture

  • Control width of output in Knit.

Today

  • Data visualization with ggplot2.

  • Data transformation with dplyr.