Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-21 Thread J C Nash
Thanks Duncan for being a bulldog on this issue. Finding bugs like this take energy and tenacity. JN On 2025-01-21 11:40, Duncan Murdoch wrote: And now I've found the elusive bug in show.error.locations = TRUE as well, and posted a patch for that too. Back to the original topic of this thread

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-21 Thread Duncan Murdoch
And now I've found the elusive bug in show.error.locations = TRUE as well, and posted a patch for that too. Back to the original topic of this thread: I think most users should routinely use options(show.error.locations = TRUE) e.g. in their .Rprofile. That will often speed up bug fixes,

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-20 Thread Duncan Murdoch
I've posted a patch to bugs.r-project.org that fixes the traceback() issue. It's not specific to findFun3; you get the same problem with errors from expressions like 1 + "a" In my testing, I occasionally saw cases where show.error.locations = TRUE didn't work. I'll try to track down a repr

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-20 Thread Duncan Murdoch
Sorry, I'm not seeing the first problem now: options(show.error.locations = TRUE) works fine. Not sure what I did wrong before. I'm still seeing `traceback()` failing to report the attempt to call nofunction(). I suppose this is because a context is never set up for the failed call. Perhap

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread avi.e.gross
gmail.com; 'Ivo Welch' ; luke-tier...@uiowa.edu Cc: r-help@r-project.org Subject: Re: [R] [External] Re: Parser For Line Number Tracing Avi, Yes, R (really S) was not designed for novice users but rather for experts. For better or worse it has evolved into a programming language used by

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread Sorkin, John
) Baltimore, MD 21201-1524 Cell phone 443-418-5382 From: R-help on behalf of avi.e.gr...@gmail.com Sent: Sunday, January 19, 2025 3:31 PM To: 'Ivo Welch'; luke-tier...@uiowa.edu Cc: r-help@r-project.org Subject: Re: [R] [External] Re: Parser For L

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread Duncan Murdoch
Thanks for pointing out the options. Using options(show.error.locations = TRUE) works on Ivo's example, but it doesn't show a location if the error happens in a function that doesn't have srcrefs, because the known location isn't on the top of the stack. Perhaps TRUE (and maybe "top"?) s

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread avi.e.gross
to write you a snippet of code that may work and learn next to nothing you can use to do more. -Original Message- From: R-help On Behalf Of Ivo Welch Sent: Sunday, January 19, 2025 12:01 PM To: luke-tier...@uiowa.edu Cc: r-help@r-project.org Subject: Re: [R] [External] Re: Parser For

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread Sorkin, John
025 11:46 AM To: Ivo Welch Cc: r-help@r-project.org Subject: Re: [R] [External] Re: Parser For Line Number Tracing On Sun, 19 Jan 2025, Ivo Welch wrote: > Hi Duncan — Wonderful. Thank you. Bug or no bug, I think it would be > a huge improvement for user-friendliness if R printed the l

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread Ivo Welch
understood. but, please, consider not people like me but unwary beginners and students of R. I have used R now for decades, and even I am baffled by it. Couldn't you make R code easier to debug not only for people like me (who can indeed tweak their environments) but also for novice users? On S

Re: [R] [External] Re: Parser For Line Number Tracing

2025-01-19 Thread luke-tierney--- via R-help
On Sun, 19 Jan 2025, Ivo Welch wrote: Hi Duncan — Wonderful. Thank you. Bug or no bug, I think it would be a huge improvement for user-friendliness if R printed the last line by default *every time* a script dies. Most computer languages do so. Should I file it as a request for improvement t