Saving and closing your work.
Unless you’re returning to work in R Studio in a short while, you should make a habit to save all open tabs and completely shut down R studio when you are done working. This ensures your environment is cleared. This is a good thing.
Restart R
To restart R without shutting the entire window down, go to the file menu bar in the top,
Session –> Restart R and Clear Output
This is good to do when switching between projects/classes.