I am running my R scripts on a remote shell using

M-x shell
ssh -X -C name@server.edu
srun -p nodeX --pty R  (slurm command to start R)
M-x ess-remote and select 'R'

everythink works fine, until I want to break (usually C-c C-c within shell). Breaking also does not work using the menu bar. It keeps running. Any suggestions as to what I'm doing wrong?

  • the recommended way to use ess on a remote machine is via tramp: ess.r-project.org/Manual/… . That might work better than ess-remote – Tyler Apr 22 '19 at 12:13

You can interrupt the remote process with C-q C-c<RET> in the shell buffer.

C-q inserts the following key into the shell ( in this case C-c : a break).

  • It inserts a ^C into the shell, but the output keeps going. Simply tried it with c(1:10000) RET C-q C-c RET. It keeps scrolling. – leze Jun 14 '18 at 17:32

Here is an intermediate work-around for my problem. In R, to omit accidentally printing long outputs, one can set


e.g., to limit the maximum number of printed lines to 999 (helpful for large datasets). Still not the perfect solution, but it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.