In bash I can trap SIGINT
, SIGKILL
, SIGTERM
, and so on. That allows me to do different things depending how the program was unexpectedly stopped.
Is there a way to do this in R?
In bash I can trap SIGINT
, SIGKILL
, SIGTERM
, and so on. That allows me to do different things depending how the program was unexpectedly stopped.
Is there a way to do this in R?
Expanding a bit on my comment which OP asked me to post as an answer
The help file for conditions has the description
There are many handling functions explained in the file, with examples. So I suggest starting with
Additionally,
tools::assertCondition
might be worth a look too. It is linked at the bottom of the conditions documentation.