- In
RStudio
, Esc
works, on windows, Mac, and ubuntu (and I would guess on other linux distributions as well). - If the process is ran in say ubuntu shell (and this is not
R
specific), for example using:Rscript my_file.R
Ctrl + c
kills the processCtrl + z
suspends the process - Within R shell,
Ctrl + C
kills helps you escape it
Control-C works, although depending on what the process is doing it might not take right away.
If you're on a unix based system, one thing I do is control-z to go back to the command line prompt and then issue a 'kill' to the process ID.
Try out Ctrl + z But it will kill the process, not suspend it.
You should be able to run kill in terminal:
$ kill -2 pid
You can find the pid by running
$ps aux | grep exec/R