0

What is a good way to stop/cancel the current computation when R gets 'stuck' in a demanding computation? (I'm using Rx64 3.2.0 on Windows 7).

Pressing "ESC" is supposed to be able to stop the current computation... but often times it does not really work, especially with intense computations. I often have to kill the R process to stop it and am forced to restart the session.

theforestecologist
  • 4,667
  • 5
  • 54
  • 91
  • ctrl-C should have same effect as `esc`. Some routines are not written to accept keyboard interrupts. – IRTFM Jul 23 '15 at 22:16
  • I managed to get a second window (session) of R to open up...Is there any way to use this second session of R to tell the other 'jammed' session to stop? (clearly I'm trying to avoid losing my last hour of work) – theforestecologist Jul 23 '15 at 22:16
  • 1
    No, there is no inter-process signaling mechanism. – IRTFM Jul 23 '15 at 22:17
  • Just FYI: It's 'stuck' computing a 3 variable (with interaction ) linear model using lm(), with something like 70k observations. I would have expected lm() to accept keyboard interrupts. – theforestecologist Jul 23 '15 at 22:20
  • 2
    I would have as well, but sometimes R does not live up to my expectations. That doesn't seem as though it should take more than a couple of seconds, but I have seen cases where a continuous variable got coded as factor and tasks that appeared to be simple computations then "exploded". – IRTFM Jul 23 '15 at 22:44

2 Answers2

0

I find that CTRL + c usually works for me.

Eric Brooks
  • 657
  • 5
  • 13
0

If you are using RStudio, its console window has a little red icon on the upper right corner, and you could press that icon to stop the running computation.

API
  • 480
  • 3
  • 10