I want to kill an R process manually and want something to be executed at that time.
For example, I have integrated my data and processed with MongoDB. So for instance, if I have to stop an R code manually at some point, I want a process status to be changed in MongoDB to, say, "STOPPED".
Can someone tell me how to do it? Thanks in advance!