[R] Parser For Line Number Tracing
Ivo Welch
|vo@we|ch @end|ng |rom gm@||@com
Sun Jan 19 00:41:18 CET 2025
I often find myself hunting where in my program an error has happened,
(of course, in R, many error messages are mysterious in themselves,
too, making it even harder.) the way I do it is mostly with inserting
`message()` statements.
what I would really like to have is a parser that inserted 'curline
<<- ##' into the R code, where '##' is the filename and line number.
something like 'addtracker one.R two.R' and thereafter I can run two.R
and, when the program dies, use `print curline` to find out where my
error has roughly occurred.
has someone already written such an 'instrumenter'?
More information about the R-help
mailing list