If you’re working on data that takes a long time to process, consider adding a the following to your analysis.
This will let you reload your environment. One can also by default save your environment when closing Rstudio but that may make it easy to reference objects that no longer are generated in the document itself thereby speeding software rot.