View source: R/clear_all_but.R
clear_all_but | R Documentation |
The global workspace is cleared while keeping (only) selected variables.
clear_all_but(keep = NULL)
keep |
Variables to keep. Specified as a vector of strings. |
An R version of the eponymous custom MATLAB function (https://de.mathworks.com/matlabcentral/fileexchange/25339-clear-all-but).
Moritz Schaaf
clear
; rm
; ls
;
## Declare variables a <- 1 b <- "abc" c <- NA ls() ## Clear workspace clear_all_but(c("a","b")) ls()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.