I want to capture the input and output of R into a separate text file. I found that the best way to do so is a combination of sink()
and source()
commands (How to save all console output to file in R?).
My problem is that in some data constellations, I get error messages. The exeution of the script via source()
seems to stop right after an error occurs. However, I would like to run the script to the end and simply record everything, including the errors.
How can I adapt my approach to "skip" errors?