I have 2 RStudio projects, and one of them (project RED) depends on the other (project BLUE, besides many other CRAN dependencies). I've always installed both projects and all CRAN dependencies globally on my computer, but now I am trying to adapt them to packrat
in a new computer (for now I have only installed globally the packrat
package itself).
- I don't really need to configure any local repository (it is just a single dependency on another local project), and I've read that I don't actually need to do that.
- On RStudio, I open project BLUE and go to
Build > Install and Restart
, and all CRAN dependencies get installed locally thanks topackrat
. Everything is great and I get the installation path:/Users/MYUSER/Documents/GitHub/PATHTOMYPROJECT/packrat/lib/x86_64-apple-darwin15.6.0/3.6.1
- I open then project RED and select
packrat > Use packrat with this project > Add local repository > [Path of step 2]
And then I get this error:
> 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