Posts Tagged ‘ debugging ’

To attach() or not attach(): that is the question

May 3, 2011
By
To attach() or not attach(): that is the question

R objects that reside in other R objects can require a lot of typing to access. For example, to refer to a variable x in a dataframe df, one could type df$x. This is no problem when the dataframe and variable names are short, but can become burdensom...

Read more »

A plea for consistent style!

December 22, 2010
By
A plea for consistent style!

As we get close to the end of the year, it's time to look back over the past year and think of resolutions for 2011 and beyond. One that's often on my mind relates to ways to structure my code to make it clearer to others (as well as to myself when I l...

Read more »

Oh (de)bugger! Part II

September 3, 2010
By
Oh (de)bugger! Part II

In the first part of this series, I discussed some standard debugging techniques, like the use of the browser function. One of the limitations of browser is that it isn’t much help if the problem is somewhere higher up the call-stack. ... The function I’m going to show you uses sys.calls to retrieve the call stack, and sys.frames...

Read more »

Oh (de)bugger!

August 26, 2010
By
Oh (de)bugger!

By number of questions asked, R passed MATLAB for the first time on Stack Overflow today. Thus it seems an appropriate time to write my first R-based post. This post concerns what to  do when your R-code goes pear shaped. Back in June there were a couple of very good videos on R debugging that

Read more »

Advanced debugging techniques in R

August 2, 2010
By
Advanced debugging techniques in R

Read more »