An environment such as Rstudio saves information about the last usage. If you are creating a stack with an application that saves state information, you will want to clear that information first. In the example of Rstudio that means closing all open files, clearing the console and clearing environment variable.
- Ctrl - L clears the console (when it is selected)
- Use the brush in the environment pane to clear variables
- Ctrl-Shift-W will close all open files.