Packrat is a neat tool in theory, but for years it has been plagued by huge hang times upon starting RStudio, and the devs don't seem to be able to fix the issue. It's become unsustainable in my project. Does anybody have any good alternatives to packrat? Google searches did not turn up anything useful, so any help would be greatly appreciated.
I'll assume you're using Packrat for reproducibility, rather than version control.
Start with the CRAN task view for reproducible research , specifically the section on Package Reproducibility. You'll find it suggests checkpoint, rbundler and packrat.
Another approach is to move from Base R to Microsoft R open. It has reproducibility built in.
Side Note: As an example use case of reproducibility, let's assume you've written some R code with packages. Then you share your research. But the package owner makes a change between the time you did the research and the time someone else is trying to reproduce your research. The change made by the package owner breaks your research. In order for someone to reproduce your research, they need to use your code WITH THE ORIGINAL PACKAGE - not the new package.
{renv} is developed by the RStudio folks and aims to solve at least some of the problems that packrat had: https://blog.rstudio.com/2019/11/06/renv-project-environments-for-r/
"The goal then is for renv to be a robust, stable replacement for the Packrat package, with fewer surprises and better default behaviors."
© 2022 - 2024 — McMap. All rights reserved.
checkpoint
, though I personally think it is missing a few key features that preclude its use in many workflows. Regardless, this type of question is not appropriate for SO: it is specifically off-topic to ask for library suggestions; and there is another more appropriate stack site: Software Recs. (BTW:packrat
is more about reproducibility than version control, but that's not your point.) – Mcgawpackrat
andcheckpoint
, I do not know of any packages or formal methods within R to ensure point-in-time reproducibility. I have not spent nearly as much time thinking about it as both of those packages, but when doing so I could think of no way to ensure package version equivalence without significant overhead at some point. Perhaps I'm not smart or experienced enough in R (or dev in general) to do it, but ... it's difficult. It just is. – Mcgaw