[R] debug an error that incapacitates R?

Liviu Andronic landronimirc at gmail.com
Sun Dec 13 13:04:38 CET 2009


Hello
And thank you for the quick answer.

On 12/13/09, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>  I think you need to go back to old-fashioned debugging methods. Identify
> the line the triggers the error, by using debug() and single stepping
> through sosInit(), or by adding print() or cat() statements to it (or
> setting tracepoints with trace()), and seeing how many succeed before things
> go bad.
>
Experimenting with browser() and subsequently with the step-through
debug() I managed to identify the first line that triggers the
"invalid connection" error:
doItAndPrint(paste("## Launching RSiteSearch, please be patient.."))



>  Once you see the bad line, it may be obvious what's wrong with it, or you
> may need to ask for help, by putting together a minimal example that
> triggers it.
>
Unfortunately, there is nothing obviously wrong with the call, nor
with the environment. Omitting the line makes the function work in all
my test cases. I will contact John Fox on this.

Thank you
Liviu




More information about the R-help mailing list