Re-initialize with packrat::init()

292 Views Asked by At

I have no idea how to make this problem reproducible, but here is a description of the problem nevertheless. I upgraded to R v 3.4.0 yesterday (sessionInfo() is below) and one of my RStudio projects couldn't update packages in packrat. After messing around with various "fixes" without success, I decided to delete packrat (packrat directory, project dir's .RStudio file) in the end. Unfortunately, I can't seem to re-initialize packrat in this project now. The following is the R output from

> packrat::init()
Initializing packrat project in directory:
- "~/my-project-path"
Error in isNamespaceLoaded(pkg) : 
  attempt to use zero-length variable name
In addition: Warning message:
In FUN(X[[i]], ...) : Package '' not available in repository or locally

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.0  magrittr_1.5    tools_3.4.0     yaml_2.1.14     stringi_1.1.5  
[6] knitr_1.15.1    stringr_1.2.0   packrat_0.4.8-1 evaluate_0.10  

Any help is very much appreciated. I thought about re-cloning the repo from github, but that would involve copy a large amount of files over from various directories that aren't under revision control currently.

Thanks!

0

There are 0 best solutions below