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