Suppose if I delete all the objects from current session:rm(list=ls())Is there any way in base R or using a function from a package which lets me restore the deleted objects from the current session?
How to restore deleted objects in R?
r;data mining;statistics
The answer is unfortunately no. There is no handy ctrl-z method. A tip to avoid these situations: I suggest you always save either the 'environment' or, as I prefer to do, the scripts with the codes for the desired objects, and save them regularly. I never type any commands directly into a work space, but always in a script which I save. This is so I can always look back at which steps I took in my coding. Personally, I save my scripts with date notations in the file name - so when I change a script I'll still have access to the old version of the scripts. It has happened quite a few times that I've changed a code and later realized that the old code was better. It's quite a hassle when you don't have the old file saved.