Automatically clear Rstudio temp files when manually stopping background “job”

When I manually stop an Rstudio local background job (that is running a loop over many rstan analyses), Rstudio/R treat the job as if it's failed (rather than purposely stopped), and I'm stuck with 10's of GB of files in my "C:\Users[username]\AppData\Local\Temp" folder that I must manually remove. Is there some way to have Rstudio automatically remove these files only when a job is manually stopped (as opposed to failing)?

Does this occur in a plain R session executed outside of RStudio, as well? (Ie: is this problem unique to RStudio, or does it affect R + Stan in general?)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.