[R] How to download all packages and then install

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Feb 21 08:54:18 CET 2012


On 21/02/2012 03:31, Xiong Deng wrote:
> Hi,
>
> I am working on a stand-alone Linux Redhat machine, which is disconnected
> to outside...But I need R to be installed on the machine....
>
> The only way available, so far as I know, is to download all the packages
> first and then copy to the machine and finally install them locally...
>
> But how can I download all the packages instead of using the
> install.packages(....) ?

The simplest way is to create a local CRAN mirror, then use a file:// 
URL to refer to it.

The part of CRAN you need is ca 2GB at present.  I use an rsync script 
something like

rsync -rvCtL --delete --include="*.tar.gz" --include="PACKAGES*" 
--exclude="*/*" cran.r-project.org::CRAN/src/contrib .

(so as not to mirror the 16GB Archive) and access it via
contriburl="file:///.../R/packages/contrib"


> Thanks
> Xiong
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list