§2024-12-17

RStudio IDE User Guide

¶RStudio Panes

RStudio-01.png

¶ Blank slate

When you quit R, do not save the workspace to an .Rdata file. When you launch, do not reload the workspace from an .Rdata file. Long-term reproducibility is enhanced when you turn this feature off and clear R’s memory at every restart. Starting with a blank slate provides timely feedback that encourages the development of scripts that are complete and self-contained.

In RStudio, set this via Tools > Global Options, making sure to clear “Restore .RData into Workspace at Startup” and choosing Never on the “Save workspace to .RData on exit”.

Summary:

The .RData file is saved in your current working directory and contains all objects from your R environment.

You can choose not to save this file when quitting R by setting RStudio to "Never save" the workspace in Global Options > General. If you want a fresh, clean environment each time you open RStudio (a "blank slate"), select Never save in the settings.