Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Risk in deleting suspended session data?

In a .Rproj.user folder there is a folder named "B1B3AE79/suspended-session-data." Inside that folder is an object named "environment" taking up over 60 GB of space. I need to clean this up. I have saved .Rmd scripts and datasets elsewhere.

What would I risk by deleting "B1B3AE79/suspended-session-data/environment?"

like image 382
johnckane Avatar asked Feb 05 '23 10:02

johnckane


1 Answers

When RStudio detects that an R session has been idle for a period of time, it will suspend that session -- this effectively amounts to saving the R session state (global environment, attached packages, and so on) and then re-loading it when you next return to that session.

As you've seen, since that suspend also implies saving the global environment to disk, this implies that large data objects will potentially be saved when the session is suspended as well.

Deleting that data implies that a 'suspended' R session will not be able to successfully restore the previous session -- whether or not that is a severe issue likely depends on how you use R / RStudio, but as long as you can easily re-read or re-create your workspace from saved source files, it shouldn't be too big a problem.

like image 90
Kevin Ushey Avatar answered Feb 16 '23 16:02

Kevin Ushey