If you `source("test.R", keep.source=FALSE)`, you will see that the > line number is not reported. > > Not always.
I have code that uses sapply to call another function and all I get back is the line of the sapply. Useful but in the 21st century I do think I could get more aid from the runtime and compiler to help me. I am giving up. In the short term I am giving yup on expecting line numbers (running with anything other than options(error=NULL) is a pain for all sorts of reasons) and in the medium term I am giving up on R. It is sad. R is very powerful and I can say a lot with very little. But I have been using it intensely for 3 years, written (and debugged) thousands of lines of code. It is exactly what I need *but* the debugging facilities are too primitive and the time gained in design and implementation is lost, with interest, in debugging. IMO R is very suitable for simple tasks that would be complex in other languages. But once it gets complex in R, it is too hard. I am not saying R is very bad - far from it. But for ambitious projects it cannot compete without proper debugging facilities. It may be that I am not good enough at programming - fair enough. But I am what I am, and I have been beating my head against this for far too long. Having large amounts of code in R that I use every day I am not running away at high speed. But I am moving away. If R gets modern debugging (lets say up to where gdb was in the early 1990s) I'll be back with a big smile on my face. But I cannot dictate the priorities of the R maintainers, and I will not try. peace Worik Stanton Dunedin New Zealand [[alternative HTML version deleted]] ______________________________________________ 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.