Is it possible to create hooks in packrat? (To store built binaries in Artifactory)

Crosspost from: https://groups.google.com/forum/#!topic/packrat-discuss/wTFfESDrOBo

Here's what I'd like to accomplish:

Once I install a package locally, I'd like to push the built binaries to Artifactory, so that the next user in my org does not have to also build the source code. Packrat takes forever to download and build the source for our dependencies, and I'd like to push the built binaries to our artifactory CRAN mirror so that my colleagues don't have to build the same deps. Here's the documentation I'm looking at for pushing the built packages: https://www.jfrog.com/confluence/display/JFROG/CRAN+Repositories

The fact that packrat::restore() can take 20-30 minutes is a major limiting factor for adoption at my company, so I'm looking for ways to resolve it. I'm open to other suggestions as well. I tried using renv but it seems like it's not much faster, because it also builds the source.

Hi lsklyut,

A couple things here:

  • renv is a drop-in replacement for packrat written by the same author, but a few years later. Would recommend switching. One of the main benefits in this case is that it maintains a user-wide cache of packages, so you won’t need per-project copies of packages.
  • If your target machines are Linux, you might want to consider installing from packagemanager.rstudio.com, which is serving binaries for Linux packages, drastically decreasing install times.
  • If you're also using private packages in addition to CRAN, we see many people using RStudio Package Manager for that purpose including via integrating with Artifactory.