I want to use packrat
on a Windows 7 machine with no internet connection.
I have downloaded all binary packages from http://cran.r-project.org/bin/windows/contrib/3.1/
into the local folder C:/xyz/CRAN_3_1
.
The problem is now that
packrat::init(options=list(local.repos="C:/xyz/CRAN_3_1"))
throws a bunch of warnings and errors like
Warning: unable to access index for repository http://cran.rstudio/bin/...
Warning: unable to access index for repository http://cran.rstudio/src/...
Fetching sources for Rcpp (0.11.4) ... Failed
Package Rcpp not available in repository or locally
As it seems packrat
tries to find
- the binary version of
Rcpp
on CRAN (fails since there is no internet connection) - the source of
Rcpp
on CRAN (fails since there is no internet connection) - the local source of the package (fails since I only have the binaries)
What I don't understand is why packrat
does not also search for the local binary package...
Question 1: I could download the source CRAN repository to get around this problem. But I would like to know from you guys whether there is an easier solution to this, i.e., whether it is possible to make packrat
accept a local binary repo.
Question 2: When I create my own package myPackage
with packrat enabled, will the myPackage
-specific local packrat
library also be included in the package? That is, assume that I give the binary myPackage
zip File to one of my colleagues who does not have one of the packages that myPackage
depends on (let's say Rcpp
). Will Rcpp
be included in myPackage
when I use packrat
? Or does my colleague have to install Rcpp
himself?