Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I break out of a readline() loop in RStudio?

Tags:

r

rstudio

If "my friend" made the foolish mistake of entering the following code in RStudio, how would I (I mean, he!) break out of the loop (without restarting R)?

while (TRUE) readline()
like image 959
daknowles Avatar asked Apr 30 '15 00:04

daknowles


1 Answers

You can restart the R session within RStudio using: Ctrl+Shift+F10 in Windows or Command+Shift+F10 in Mac. The workspace and the command history won't be cleared so, I suppose, it would be as if you broke out of the loop.

like image 52
mpalanco Avatar answered Nov 13 '22 23:11

mpalanco