Common questions on HW1
-
R Studio freezes.
-
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
-
Pass string arguments to R from command line.
-
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
-
Start early!
-
Ask for help. You are most likely to get good help if you provide a minimal reproducible example.
https://stackoverflow.com/help/mcve
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Questions from last lecture
- Control width of output in Knit.
Today
-
Data visualization with ggplot2.
-
Data transformation with dplyr.