Run rm(list=ls()) but sparing some objects from being deleted. This function is particularly handy when you want to clear the memory but want to keep the the database connection object.
rmAllBut(but, env = .GlobalEnv, quiet = F)
character vector of variables that should not be deleted.
environment to clean up. Defaults to .Globalenv
logical should functions print output? Defaults to falase.