[R] basic debugging

ilai keren at math.montana.edu
Thu Feb 9 06:01:21 CET 2012


?debug will satisfy your curiosity regarding "debug mode"  - strictly
speaking it is not a "mode", just another function.


On Wed, Feb 8, 2012 at 7:30 PM, R. Michael Weylandt
<michael.weylandt at gmail.com> wrote:
> What is your question? More interestingly, what is "debug mode" in R?
>
> I'd suggest you look at traceback() -- there's also the powerful, but
> possibly advanced, options(error=recover)
>
> Kerninghan said "The most effective debugging tool is still careful
> thought, coupled with judiciously placed print statements." It's good
> advice, particularly for debugging something in a loop.
>
> Michael
>
> On Wed, Feb 8, 2012 at 5:25 PM, ikuzar <razuki at hotmail.fr> wrote:
>> Hi,
>>
>> I have to debug my program. When I execute my function (in debug mode), I
>> have got an error but I do not know which line is concerned. I do not want
>> to do an infinite "Browse[2]>n  with each line in my function...
>>
>> THanks for your help,
>>
>> ikuzar
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/basic-debugging-tp4371113p4371113.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list