[R] Line numbers in error messages

2004-04-12 Thread Webb Sprague
Hi all, I have searched but to know avail. Is there a way to get a line number when a function crashes? I am doing an edit-source-run cycle. Feel free to cc me as I subscribe to the list in digest. Thanks W __ [EMAIL PROTECTED] mailing list

Re: [R] Line numbers in error messages

2004-04-12 Thread Uwe Ligges
Webb Sprague wrote: Hi all, I have searched but to know avail. Is there a way to get a line number when a function crashes? I am doing an edit-source-run cycle. I don't think so, but traceback(), debug() and options(error = recover) are your friends. Also, you might want to check out

Re: [R] Line numbers in error messages

2004-04-12 Thread Webb Sprague
Hi Patrick, It's very simple using a browser() line in your function somewhere you know your code's OK, then run line by line. The problem is that sometimes you have code of a few hundred lines, to which you have added a strange little line that craps out because of some silly mistake that

Re: [R] Line numbers in error messages

2004-04-12 Thread A.J. Rossini
Uwe Ligges [EMAIL PROTECTED] writes: Webb Sprague wrote: Hi all, I have searched but to know avail. Is there a way to get a line number when a function crashes? I am doing an edit-source-run cycle. I don't think so, but traceback(), debug() and options(error = recover) are your

Re: [R] Line numbers in error messages

2004-04-12 Thread Jason Turner
Webb Sprague wrote: I already use ESS. If it would give line numbers, my life would be perfect! It does, if you don't use source(). Have your R code in one buffer, and the R session running, and (from the code buffer), type C-c C-l. Cheers Jason

Re: [R] Line numbers in error messages

2004-04-12 Thread Thomas Lumley
On Tue, 13 Apr 2004, Jason Turner wrote: Webb Sprague wrote: I already use ESS. If it would give line numbers, my life would be perfect! It does, if you don't use source(). Have your R code in one buffer, and the R session running, and (from the code buffer), type C-c C-l. Yes, yes,

Re: [R] Line numbers in error messages

2004-04-12 Thread Duncan Murdoch
On Mon, 12 Apr 2004 15:20:58 -0700, you wrote: Hi Patrick, It's very simple using a browser() line in your function somewhere you know your code's OK, then run line by line. The problem is that sometimes you have code of a few hundred lines, to which you have added a strange little line that

Re: [R] Line numbers in error messages

2004-04-12 Thread Tony Plate
Isn't source file information often recorded in the source attribute on functions (or calls)? Could either the execution engine or the debugger refer to that information? (Though, in the debugger it might be impossible to uniquely identify expressions that appear multiple times in the

Re: [R] Line numbers in error messages

2004-04-12 Thread Patrick Connolly
On Mon, 12-Apr-2004 at 03:20PM -0700, Webb Sprague wrote: | Hi Patrick, | | It's very simple using a browser() line in your function somewhere you | know your code's OK, then run line by line. | | The problem is that sometimes you have code of a few hundred lines, to | which you have added a

Re: [R] Line numbers in error messages

2004-04-12 Thread Thomas Lumley
On Mon, 12 Apr 2004, Tony Plate wrote: Isn't source file information often recorded in the source attribute on functions (or calls)? Could either the execution engine or the debugger refer to that information? (Though, in the debugger it might be impossible to uniquely identify expressions