我有2个RStudio项目,其中一个(项目RED)依赖于另一个(项目BLUE,此外还有许多其他CRAN依赖项)。我一直在计算机上全局安装项目和所有CRAN依赖项,但是现在我试图在新计算机上将它们适应packrat
(目前,我仅在全局安装packrat
软件包本身)。
Build > Install and Restart
,由于packrat
,所有CRAN依赖项都在本地安装。一切都很好,我得到了安装路径:/Users/MYUSER/Documents/GitHub/PATHTOMYPROJECT/packrat/lib/x86_64-apple-darwin15.6.0/3.6.1
packrat > Use packrat with this project > Add local repository > [Path of step 2]
然后我得到这个错误:
> packrat::init(options = list(local.repos = c("~/Documents/GitHub/PATHTOMYPROJECT/packrat/lib/x86_64-apple-darwin15.6.0/3.6.1")))
Initializing packrat project in directory:
- "~/Documents/GitHub/PATHTOMYPROJECT"
Error in read.dcf(...) : no se puede abrir la conexión
Además: Warning message:
In read.dcf(...) :
cannot open file '/Users/MYUSER/Documents/GitHub/PATHTOMYPROJECT/packrat/lib/x86_64-apple-darwin15.6.0/3.6.1/NAMEOFTHELIB': it is a directory