Code to clear all plots in RStudio

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

    dev.off() only works in an interactive session. If you're interested in implementing such behavior in a script, you should use

    graphics.off()
    

    instead.

提交回复
热议问题