The command rm(list=ls())
is used clear the R
workspace (i.e. clear all the objects shown by ls()
). To clear the console, I personally do like pressing CTRL + L
but you can alternatively use cat("\014")
. To clear all the plots, you can use dev.off()
. However, this doesn't clear a 3D plot in RGL devices opened in XQuartz
on Mac. My questions are:
- Is there a single command to clear the workspace and all the plots at the same time?
- Any command to remove all the plots irrespective of the graphical device that we use
Any pointers to get around this are appreciated.