How do I clear all the Source (aka View) tabs in R

2019-04-06 18:08发布

问题:

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:

  • Moving .RData
  • Moving .Rhistory
  • Google searching "rstudio clear source" "rstudio delete tabs" etc.

Thanks in advance!

回答1:

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.