Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could Emacs Speaks Statistics loop through a R for loop like a real debugger?

I am a happy user of ESS for coding and debugging R code. I have found a elusive bug recently deeply inside several for loops and ifs structures.

Is there any way of having ESS selectively travel the if/else structures or loop for all the values in a for loop?.

Does R or ESS have debugger mode where you can skip else clauses, loop the values and step into, step through, return etc?

[UPDATE]

Thanks @jubba for the link to the other SO question about debugging tools for R-language. At the end this was my real question. This other thread give the links for the kind of things that I wanted to know about the way of doing debugging in the current R.

  • R-debug-tools.pdf
  • debuggingR
  • and the one for debugging with ESS, ess-tracebug
like image 548
Pablo Marin-Garcia Avatar asked Feb 23 '11 15:02

Pablo Marin-Garcia


1 Answers

There has been a more general question about debugging in R on Stackoverflow :

Debugging tools for the R language

One answer by Davor Cubranic points to ess-tracebug which is, according to its website, "An emacs package for interactive debugging and error tracing in ESS". I've never used it myself, but it may be useful to you :

http://code.google.com/p/ess-tracebug/

like image 69
juba Avatar answered Sep 28 '22 08:09

juba