Re: [R] debugging functions in R

2011-08-25 Thread Spencer Graves
See also the debug function, which allows you to walk through a function line by line. I also concur with Duncan's recommendation to try the R package system. I'm an author of one of two contributed documents available from CRAN -> Documentation: Contributed -> "Creating R Packa

Re: [R] debugging functions in R

2011-08-25 Thread Duncan Murdoch
On 11-08-24 10:20 AM, Eran Eidinger wrote: Hi, I am not sure if this is the right list to ask this question (though I did not find a more appropriate one). I've started using R a month ago, and small scripts work fine. However, when I start writing more complex code, it gets messy. 1. Is there

Re: [R] debugging functions in R

2011-08-24 Thread jim holtman
Also check out the 'debug' package On Wed, Aug 24, 2011 at 10:59 AM, Eran Eidinger wrote: > Wow, thanks Justin and Liviu, > > DebugOnce and browser. great! > > Eran > > On Wed, Aug 24, 2011 at 5:34 PM, Justin Haynes wrote: > >> Another great tool is debugonce() >> >> wrap your function name in i

Re: [R] debugging functions in R

2011-08-24 Thread Eran Eidinger
Wow, thanks Justin and Liviu, DebugOnce and browser. great! Eran On Wed, Aug 24, 2011 at 5:34 PM, Justin Haynes wrote: > Another great tool is debugonce() > > wrap your function name in it and then execute your function call. > > debugonce(my.function) > > out<-my.function(df) > > And you'll b

Re: [R] debugging functions in R

2011-08-24 Thread Justin Haynes
Another great tool is debugonce() wrap your function name in it and then execute your function call. debugonce(my.function) out<-my.function(df) And you'll be brought into the same interactive browser. (its Vi if im not mistaken which can take a little getting used to.) Justin On Wed, Aug 2

Re: [R] debugging functions in R

2011-08-24 Thread Liviu Andronic
On Wed, Aug 24, 2011 at 4:20 PM, Eran Eidinger wrote: > Hi, > > I am not sure if this is the right list to ask this question (though I did > not find a more appropriate one). > I've started using R a month ago, and small scripts work fine. However, when > I start writing more complex code, it gets