Code to clear all plots in RStudio

前端 未结 5 652
忘了有多久
忘了有多久 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:10

    To prevent error message in case there are no plots to clear:

    if(!is.null(dev.list())) dev.off()
    

提交回复
热议问题