Quit and restart a clean R session from within R?

justin picture justin · Jun 11, 2011 · Viewed 82.7k times · Source

Is there a way I can make an alias, within R, that will execute q() and then restart a clean R session?

And yes, I am too lazy to type q() and then the letter R :)

Answer

mgoldwasser picture mgoldwasser · Sep 19, 2014

If you're in RStudio: command/ctrl + shift + F10

You can also use

.rs.restartR()