Rstudio + packrat and disappearing files

13 views
Skip to first unread message

Hilmar Berger

unread,
Nov 23, 2018, 9:48:45 AM11/23/18
to packrat-discuss
Hi,

I just encountered an issue with packrat in Rstudio where files which are used (readonly) in Rmd code of the project are disappearing reproducibly (i.e.it happened more than once) from the project folders during work in Rstudio. At the same time, it seems that Rstudio was knitting Rmd files of the projects automatically in the background which lead to the generation of new subfolders in the project. It is not clear to me what happens here, but I would guess that packrat/Rstudio tries to guess the libraries used in the code and possibly sourced R code and therefore actually runs the code partially. It could happen that the newly generated subfolders are actually the remainder of that process and that in an attempt to clean-up any temporary files all files associated to file handles still open at the end of the run are removed.  This would fit the observation that the files that disappeared where opened using packages like readxl or VariantAnnotation but not read.table or similar.

packrat version was 0.4.9-3, Rstudio 1.1.447

Is there any way to avoid that issue ?

Best regards,
Hilmar

Reply all
Reply to author
Forward
0 new messages