R/Debugging

From QERM Wiki
(Difference between revisions)
Jump to: navigation, search
(Interactive Debugging in R)
Line 1: Line 1:
 
==  Interactive Debugging in R ==
 
==  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 make the debugging process, which is critical in any programming assignment, as smooth, helpful, (and even fun!) as possible.  
+
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 make the debugging process, which is critical in any programming assignment, as engaging and smooth (and even fun!) as possible.  
  
 
The most useful debugging functions are <tt>
 
The most useful debugging functions are <tt>

Revision as of 16:03, 10 November 2008

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 make the debugging process, which is critical in any programming assignment, as engaging and smooth (and even fun!) as possible.

The most useful debugging functions are

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

Pdf10.png Here is a very helpful reference on interactive debugging by Roger Peng, UCLA.

Personal tools