Code to clear all plots in RStudio

前端 未结 5 705
忘了有多久
忘了有多久 2021-01-31 13:19

I have code to clear the workspace: rm(list=ls()) and code to clear the console: cat(\"\\014\")

Is there code to clear all plots from Rstudio?<

5条回答
  •  甜味超标
    2021-01-31 14:03

    I usually use

    while (dev.cur()>1) dev.off()
    

    and since I use RGL a lot, I often add:

    while (rgl.cur()) rgl.close()
    

提交回复
热议问题