R/erase-by-type.R
erase_values.Rd
Remove all objects, which are listed in `Values` section in RStudio
erase_values(pattern = NULL, envir = parent.frame(), verbose = FALSE)
pattern | regex pattern to select a set of objects; default: NULL |
---|---|
envir | environment; default: caller environment |
verbose | print removed objects' names |
NULL (function returns nothing)
Function can be used with envir = globalenv() argument.
cars.2 <- cars test_fun <- function(x) x + 2 value <- 7 erase_values(verbose = TRUE)#> [1] "Removed objects: value"