Keep your environment clean
A small utility which makes selective objects removing easier.
# install.packages("devtools")
::install_github("krzjoa/eponge") devtools
Many times we can meet a situation, when we want to clean our environment selectively. Suppose we just wrote a couple of functions, which have the same names as the ones existing in already attached libraries.
<- function(x, id){
filter %>%
x filter(ID == id)
}
<- 1:5
cars
::erase_masking() eponge
Sometimes, we may want to tidy our messy enivironment: we have objects we would like to keep, while in the same time there are many temporary objects created during the exploration.
.2 <- cars
cars.2$speed <- cars.2$speed + 2
cars
<- iris[1:20, ]
new.iris
<- function(x) x + 2
add_two
# Normally, we don't have to pass envir argument, because it indicates global environment by default
::erase_data(envir = environment()) eponge
Package was originally named sponge
, but it was changed
in order to avoid name conflict with BioConductor package SPONGE.
The current name comes from its French equivalent, éponge
(e.pɔ̃ʒ).