Search code examples
rpackrat

r packrat unbundle not recreating libraries


I am having trouble understanding what I am doing wrong when deploy a shiny application on shiny server using packrat to managing the libraries.

I create project test-deploy in RStudio, then initiate packrat with.

packrat::init()

As I work I am installing packages (dplyr, ggplot2, etc). These are stored in /test-deploy/packrat/lib/[OS]/[R Version] . All good so far.

Done working ready to deploy.

packrat::bundle()

Creates a tar file which is unbundled to shiny server with

packrat::unbundle("/test-deploy/packrat/bundles/test-deploy-2017-07-14.tar.gz", "/srv/shiny-server/")

I go to that app on shiny-server and make turn packrat on

packrat::on()

Now I check what packages are installed other than the base packages with

ip = as.data.frame(installed.packages()[,c(1,3:4)])
ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
ip

Output

        Package Version
packrat packrat 0.4.8-1

The other packages which I can see in the development version are not there? What am I doing wrong ?


Solution

  • I forgot to include

    packrat::snapshot()
    

    before

    packrat::bundle()