From QERM Wiki
Revision as of 16:24, 7 November 2008 by Aditya.khanna (Talk | contribs)
Jump to: navigation, search

Interactive Debugging in R

Often times when we write our own functions, or use other functions in various packages, the error messages can sometimes get confusing. While good programming practice and patience are keys to solving these problems, R also has some other tools that can be used to interactively debug your code. The purpose of these functions is to make the debugging process, which is critical in any programming assignment, as smooth as possible.

The most useful debugging functions are

  • traceback
  • debug
  • trace
  • options(error=recover)

www.biostat.jhsph.edu/~rpeng/docs/R-debug-tools.pdf Here is a very helpful reference on interactive debugging by Roger Peng, UCLA.

Personal tools