Description Usage Arguments Details Note Examples
Clear/reset an RStudio session
1 |
detach |
logical. If |
The clear()
function:
Clears the console window
Deletes objects from the global environment
Deletes plots and plot history from the Plots window
Unloads all but base packages (unless detach=FALSE
)
Releases memory (garbage collection)
R scripts and Rmarkdown files are left untouched. No objects saved to disk are affected.
This is a good way to start a fresh R session without having to quit and restart RStudio. Additionally, any script or Rmarkdown files remain open, the current working directory is unchanged, and you remain in any open project.
1 2 3 4 | ## Not run:
clear()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.