How to clear RStudio panes with code

Here is how to clear the RStudio console, environment, and plot windows (panes) individually or at the same time by using code (a combination of functions). Clear the RStudio console, environment, plot panes and free up memory at once rm(list = ls(envir = globalenv()), envir = globalenv()); if(!is.null(dev.list())) dev.off(); gc(); cat(“\014”) Clear the RStudio console … Continue reading How to clear RStudio panes with code