I am new to packrat, always get this error for trying to use packrat. Can anybody tell me where do I use it incorrectly?
After packrat::init(), I can install package, once installation is complete, if I would like to install packages the second time, I get error
> install.packages('reshape')
Installing package into ‘~/packrat/lib/x86_64-apple-darwin15.6.0/3.4.1’
(as ‘lib’ is unspecified)
Error in install.packages : unknown input format
Then, I checked 'packrat::clean()', get error message
> packrat::clean()
Error in readRDS(dest) : unknown input format
The same for other packrat:: functions.
> packrat::snapshot()
Error in readRDS(dest) : unknown input format
As somebody suggested in the group, 'removing all the folders in the packrat folder (lib, lib-R, lib-ext, src) and then reinstalling the dependencies thanks to packrat.lock file.'.
It works, but I cannot do this every time. If that is the case, it is a little bit painful to use packrat.
BTW, my R session information is as below, and my packrat version is 0.4.8-1
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
> .libPaths()
[1] "~/packrat/lib/x86_64-apple-darwin15.6.0/3.4.1"
[2] "~/packrat/lib-ext"
[3] "~/packrat/lib-R"
Thanks,
Yan