I'm debugging a model. The input data is prepared with a python script that calls an R script, through a python call to subprocess.check_call()
(now replaced by pbs.Command()
). This R script has various bugs. When an error happens in the R script, we can see the error message in the standard error, appearing above (or below) the python error. The problem is that the error message returned by R only returns a small part of the code where the error happens, without any line number.
We then have to search for that piece of code in the original source. It would be easier if we had the actual line number.
A related answer suggests using an IDE to run through the whole R code line by line again, but we'd like to know the line number where this error happens so we can at least run all the R code until that line.