How to stop a command in R in Windows
When running a code, the red octagon will only show while it is working things out. So while it is just running through your written code (reading data and names of things etc) then the octagon will not show.
Pressing ESC
will work, unless Rstudio is frozen.
Good luck!
You could also try interrupting/terminating the R session via the menu:
Session
-> Interrupt R
or
Session
-> Terminate R...
or
Session
-> Restart R
(Ctrl+Shift+F10)
If nothing else helps, open the Windows command line and kill the rsession.exe
proces:
> tasklist | grep rsession
# the output should be something like this:
rsession.exe 7260 Console 1 166,144 K
# The number (7260 in this case; will probably be different) is the process id (PID),
# and you can use it to kill the process:
> taskkill /F /PID 7260
Caution: this will forcefully stop the R session, and RStudio will probably have to restart (this is what happens on my machine, at least).