I would like to use a function which exports errors into a .txt file. So far I have:
error.function <- function() {
cat(geterrmessage(), file="c:/bla.txt", append=TRUE)
}
then,
options("error"=error.function)
However, that only gives me the error
without the corresponding line number May I ask for assistance in order to expand the error.function with information about the line number(my script in Rstudio begins with line1 and goes up to line 2500?