Debugging and defensive programming
Overview
- Define a bug
- Review best practices for reading, writing, and styling code
- Interpret function documentation
- Distinguish between errors, warnings, and messages
- Introduce
traceback()
and explain how to read it - Identify and practice methods for error handling and recovery
Before class
- Read Debugging R code in What They Forgot to Teach You About R
- Skim/read The
tidyverse
style guide - Read How to read an R help page
- Review 21.6 Dealing with failure in R for Data Science
Class materials
Naming things - by Jenny Bryan. A concise guide to naming files.