how to remove all objects from r workspace code example Example: remove all objects in R rm(list = ls(all.names = TRUE))