> -----Original Message----- > From: Rolf Turner [mailto:r.tur...@auckland.ac.nz] > Sent: Monday, December 14, 2009 2:07 PM > To: Brian Diggs > Cc: r-help@r-project.org Help > Subject: Re: [R] debug an error that incapacitates R? > > > Wouldn't sink.number() give you a handle on whether > the problem is that there is an invalid sink() in effect?
It would. I had forgotten about that function. On 15/12/2009, at 10:55 AM, Brian Diggs wrote: > > >> -----Original Message----- > >> From: Liviu Andronic [mailto:landronim...@gmail.com] > >> Sent: Sunday, December 13, 2009 4:05 AM > >> To: Duncan Murdoch > >> Cc: r-help@r-project.org Help > >> Subject: Re: [R] debug an error that incapacitates R? > >> > >> Hello > >> And thank you for the quick answer. > >> > >> On 12/13/09, Duncan Murdoch <murd...@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..")) > > > > I have seen this "invalid connection" type error when there is a > > sink() > > active that does not have a valid connection associated with it. > > In that > > case, any output generates the error. Try issuing sink() commands > > (without > > any arguments) to remove any active sinks. When there are not any > > more > > sinks you will get the message: > > > > Warning message: > > In sink() : no sink to remove > > > >>> 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. > > > > If it is an invalid sink, this would just be the first call that > > generates > > output. It would be a sink somewhere before that that is setting > > up a bad > > connection (which doesn't cause problems until something is to be > > written). > > > >> Thank you > >> Liviu > >> > > > > -- > > Brian Diggs, Ph.D. > > Senior Research Associate, Department of Surgery, Oregon Health & > > Science University > > > > > > > > > > ______________________________________________ > > R-help@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. > > > ###################################################################### > Attention: > This e-mail message is privileged and confidential. If you are not the > intended recipient please delete the message and notify the sender. > Any views or opinions presented are solely those of the author. > > This e-mail has been scanned and cleared by MailMarshal > www.marshalsoftware.com > ###################################################################### ______________________________________________ R-help@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.