Use R Code to Remove All Graphics Shown in RStudio (Example Code)
In this article, I’ll show how to remove all plots that are shown in RStudio in the R programming language.
Example: Clear All Graphics Shown in RStudio
plot(1:5) # Create several plots in RStudio barplot(1:5) plot(1:5, 9:5) |
plot(1:5) # Create several plots in RStudio barplot(1:5) plot(1:5, 9:5)
dev.off(dev.list()["RStudioGD"]) # Using dev.off() & dev.list() functions |
dev.off(dev.list()["RStudioGD"]) # Using dev.off() & dev.list() functions