When you quit a RStudio project, your environment (workspace) can be saved before exiting. Usually, it is in a .Rdata file in your project directory. I said can because this is an option than can be activated or deactivated, or set to ask each time you exit a project.
You'll find it in the IDE here:
Note: You see on my configuration, I never save the workspace when exiting and never restore if a .Rdata file exists
By default, I think it is on ask. So, each time you quit a project (or quit R) interactively, it should ask you if you want or not to save the workspace. It will write everythig in the .Rdata file, erasing the previous one.
Several possibility for not having anything restored:
- The option to restore is deactivated
- There no
.RData file in your project directory (or workspace), so nothing to restore.
- You have a .Rdata file but it contains less or nothing
So, you should check if this file in still present, and what it inside (load("./.RData")), and check the options in the IDE
I hope it helps.