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