powered by
Remove all objects, which are listed in `Data` section in RStudio
erase_data(pattern = NULL, envir = parent.frame(), verbose = FALSE)
regex pattern to select a set of objects; default: NULL
environment; default: caller environment
print removed objects' names
NULL (function returns nothing)
Function can be used with envir = globalenv() argument.
# NOT RUN { cars.2 <- cars test_fun <- function(x) x + 2 value <- 7 erase_data(verbose = TRUE) # }
Run the code above in your browser using DataLab