Packrat is a package for `R` which allows the creation of "drag and drop" projects, together with libraries and their required packages.
Questions tagged [packrat]
77 questions
20
votes
1 answer
Using R with git and packrat
I have been using git for a while but just recently started using packrat. I would like my repository to be self contained but at the same time I do not want to include CRAN packages as they are available. It seems once R is opened in a project with…

rjss
- 935
- 10
- 23
16
votes
2 answers
Alternatives to the packrat package - package reproducibility
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…

Nathan Calverley
- 979
- 1
- 6
- 16
11
votes
1 answer
"Repository:" field in R DESCRIPTION files
Question: What is the purpose and origin of the Repository: field in a package DESCRIPTION file?
It doesn't seem to be mentioned in the official docs for DESCRIPTION files, nor in Hadley's book. It seems to be auto-populated during CRAN upload -…

Ken Williams
- 22,756
- 10
- 85
- 147
10
votes
1 answer
Using R package source files in packrat (rather than CRAN) with Travis-CI
I'm working with an R package that is an RStudio project, and I'm using packrat to keep a local copy of the source of the packages I depend on for my project.
I've got Travis-CI checking my R package each time I make a commit, but each time Travis…

Ben
- 41,615
- 18
- 132
- 227
10
votes
2 answers
Trouble with packrat corrupting R functioning
I installed the package packrat at some point, used it perhaps once and moved on with my life.
However, despite not having loaded it in months, it remains a nuisance to my regular R usage.
Seemingly at random, my R session within RStudio will fail…

MichaelChirico
- 33,841
- 14
- 113
- 198
8
votes
2 answers
Package unavailable in package build after R update using packrat
I recently updated to R 3.1.3 and I am building a package using RStudio and packrat. I am trying to re-build my package using RStudio's in built "Build and Reload" tool, but it won't work. I keep receiving the following error:
Updating standaRd…

nathaneastwood
- 3,664
- 24
- 41
6
votes
1 answer
How does the use.cache feature of Packrat work?
Packrat has a use.cache feature to reduce package installation time.
The documentation provides the following info:
use.cache: Install packages into a global cache, which is then shared across projects? The directory to use is read through…

wab
- 797
- 6
- 19
5
votes
2 answers
How to completely remove renv from an R statistics program
I have been using renv on a R project, but now want to remove it from renv versioning, i.e. delete all renv associated files, but still have access to the libraries that I used installed under renv. How do I do this? Alternatively, how do I migrate…

Obromios
- 15,408
- 15
- 72
- 127
5
votes
0 answers
Configure packrat with some local project as a dependency (without any local repository)
I have 2 RStudio projects, and one of them (project RED) depends on the other (project BLUE, besides many other CRAN dependencies). I've always installed both projects and all CRAN dependencies globally on my computer, but now I am trying to adapt…

thelawnmowerman
- 11,956
- 2
- 23
- 36
5
votes
0 answers
packrat R taking forever to install packages
I need to use packrat in order to create a sort of virtual environment for R. I run these few lines
mywd<-getwd()
packrat::init(mywd)
packrat::set_opts(auto.snapshot=TRUE)
And everything works fine as R output show
Initializing packrat project in…

Marco Fumagalli
- 2,307
- 3
- 23
- 41
5
votes
3 answers
RStudio Connect, Packrat, and custom packages in local repos
We have recently got RStudio Connect in my office. For our work, we have made custom packages, which we have updated amongst ourselves by opening the project and build+reloading.
I understand the only way I can get our custom packages to work…

T.Holme
- 473
- 4
- 17
5
votes
1 answer
What's the hash in packrat.lock for?
I'm setting up a git workflow with my R project using packrat. Everytime I packrat::snapshot() my workspace, the file packrat.lock changes with the new packages/versions etc, but it also changes the Hash line for each package, which is a bit…

gsmafra
- 2,434
- 18
- 26
5
votes
1 answer
R: Packrat will not completely uninstall
I previously turned on packrat() in RStudio. I now wish to completely remove and disable it (i.e. revert to the state prior to installing packrat). I tried to find an option in Rstudio to disable it but could find anything. I therefore uninstalled…

socialscientist
- 3,759
- 5
- 23
- 58
5
votes
1 answer
Building R packages with Packrat and AppVeyor
Can someone point me towards a working example where packrat is used with AppVeyor to build an R package? Searching through Google and GitHub, I can't find any packrat-enable package that uses AppVeyor.
Does the appveyor.yml file need to change? …

wibeasley
- 5,000
- 3
- 34
- 62
4
votes
2 answers
Using packrat libraries with knitr and the rstudio compile PDF button
As explained by Yihui Xie in this post, when one uses the Compile PDF button of the RStudio IDE to produce a PDF from a .Rnw file, knit() uses the globalenv() of a new R session. Is there a way that this new R session would use the packrat libraries…

J.P. Le Cavalier
- 1,315
- 7
- 16