tags:

views:

109

answers:

1
+2  Q: 

Reset R instance

Is it possible to reset an instance of R?

Eg. if I have used the commands

x <- 1:10
plot(x, -x)

And thus polluted the system with the x variable. In this state can I then revert back to a clean state without shutting R down and launching it again?

+8  A: 
Richie Cotton
As I understand it, there can still be devices open after using these two commands. Is there a single command that lets you reset R back to scratch. In gnuplot the "reset" command did the job.
midtiby
R is a bit more complicated than gnuplot.
mbq
There is `closeAllConnections` function.
Marek