0

I have a working project on Rstudio Server and I want to freeze all packages into the actual working versions to avoid future issues due to global library updates.

So I run

> packrat::init()

Initializing packrat project in directory: - "~/R/statistics"

After a while all packages are downloaded and installed with no apparent issue. So I run a command to get status:

packrat::status()

and I get:

Error: This project has not yet been packified. Run 'packrat::init()' to init packrat.

Restarted R session, Rstudio and even server, but to no avail. Same message no matter I insisted. Maybe this is not the correct procedure to add packrat to an existing project but packrat documentation is not very complete.

Rstudio Server version 1.1.456 R version : 3.4.4

useRj
  • 1,232
  • 1
  • 9
  • 15
  • That certainly looks suspect. After `::init`, does it say `Packrat mode on. Using library in directory...`? Do you ever `setwd()` outside of that directory? (Does `getwd()` say the same thing as the directory you intended it to be when you ran `packrat::init()`?) – r2evans Oct 29 '18 at 19:12
  • never used setwd(). The getwd() command points out to same directory as the one I intend to freeze – Forge Oct 30 '18 at 09:34

0 Answers0