Reputation: 883
I did a bad thing and ran View(row) 8000 times using apply.
Now I have 8000 tabs in my Source pane (top left) in Rstudio.
Does anyone know how to clear them all in one fell swoop? Otherwise I'm doomed to control-W A LOT.
Things I've already tried:
Thanks in advance!
Upvotes: 22
Views: 12522
Reputation: 93
Adding another answer here just in case anyone needs it.
When I tried File>Close All
my laptop froze because of the sheer amount of tabs I had open.
I finally found the location where Rstudio is storing the tabs to restore upon reopening.
Navigate to .rstudio-desktop/sdb/
(stored in my root). I had three folders there, which if I open and peek into one of the files sure enough I could see my View()
'd objects. I moved these three folders to a temporary location (to be deleted when I am feeling brave) and recreated the empty folders. Hey presto, I can now open Rstudio with no tabs.
Upvotes: 2
Reputation: 2506
I know that if you hit
Ctrl + Shift + W
it will close all the tabs. The same option is also under
File > Close All
So just save the tab you wanted and close all.
Upvotes: 32