Keyboard shortcut to empty workspace/environment in RStudio

Alt+S+C

This shortcut opens up menu and clears the workspace variables.


in Rstudio version >0.99.878 you can customize shortcuts with "Modify Keyboard Shortcuts..." under the "Tools" tab. There you can set the "clear workspace" option to a keyboard shortcut of your choice.


Why should you have one?

I think, that it is enough to type rm(list =ls()) in the console. And it is also more sure from accidentally typing a shortcut and possibly loosing important work.

However, you have a shortcut to restart the R session which is Ctrl+Shift+F10 that detach the loaded packages without voiding the global environment.