I\'m writing some R code that calls other code that may fail. If it does, I want to print a stack trace (to track down what went wrong), then carry on regardless. However, t
If something that triggers on option(error...) is of interest, you can also do this:
options(error=traceback)
From what I can tell, it does most of what Bob's suggested solution do, but has the advantage of being much shorter.
(Feel free to combine with keep.source=TRUE, warn=2, etc. as needed.)