powered by
rm(list=ls())
clear(obj = NULL, keep = TRUE)
obj
# create objects a=1; b=2; c=3; d=4; e=5 # remove d clear("d", keep=FALSE) ls() # remove all but a and b clear(c("a", "b"), keep=TRUE) ls()
Run the code above in your browser using DataLab