• Online, Self-Paced
Course Description

One of the most important tasks in any programming language or development environment is debugging. In this course, you'll discover ways you can debug R code and improve the resilience of your R programs through defensive programming.

Learning Objectives


  • start the course
  • debug R code with RStudio
  • use the traceback function to examine the call stack
  • use browser to step through R code
  • use R warning and message functions
  • implement handlers for debugging
  • use the microbenchmark library to benchmark R performance

Defensive Programming in R

  • identify methods of defensive programming in R
  • set your R program to report warnings as errors for debugging
  • implement asserts in R

Memory Management

  • use the pryr library to examine memory use in R
  • trace address and reference information in R using pryr

Practice: Using Debugging

  • add the browser function to some R code to debug it

Framework Connections

The materials within this course focus on the Knowledge Skills and Abilities (KSAs) identified within the Specialty Areas listed below. Click to view Specialty Area details within the interactive National Cybersecurity Workforce Framework.