[R] R binaries

Berwin A Turlach berwin at maths.uwa.edu.au
Wed Aug 31 06:23:26 CEST 2005

G'day Nam-Ky,

>>>>> "NKN" == Nam-Ky Nguyen <nkn at turing.une.edu.au> writes:

    NKN> I intend to burn some R CDs to colleagues in Vietnam.  I want
    NKN> to put all binary files for base as well as contributed
    NKN> packages (for both Windows and Linux).
I don't believe that precompiled binary files for Linux exist, since
they would depend very much on which flavour of Linux you are running.

    NKN> It is very time consuming if I download files by files. Is
    NKN> there a place a can buy a CD with all the mentioned files?
Not that I am aware off.  But I would do the following for easy
download of all contributed files:  Issue  from an R session the
following commands (mostly untested):

> options(repos=c(CRAN="http://cran.au.r-project.org/"))
> tmp <- available.packages()  # Or just use CRAN.packages() ??
## To download all source files
> download.packages(tmp, destdir=".")
## To download all windows binary
> download.packages(tmp, destdir=".", type="win.binary")

If you do it from a Windows machine, you may have to adapt the destdir
argument in those commands.  Also, if you sit behind a proxy, then you
might have to first issue an appropriate
'Sys.putenv("http_proxy"="put your proxy here")' command.

available.packages() does not seem to have a type argument according
to its documentation, so I guess that even if it is run under Windows
that it returns a list of all source packages available in contrib.
If some of those are not available as a precompiled windows binary,
the download.packages() command will probably fail with an error, so
you have to do the download in bits and pieces, removing offending
entries from `tmp' -- but that should be still faster than downloading
file by file (presumably by clicking in a web browser?).  (The
development version of R should now be more robust (Thanks again,
Brian) when downloading and just continue downloading the remaining
files if it encounters an error.  But I don't know where you run (or
what to run) R-devel ;-) ).

Hope this helps.


========================== Full address ============================
Berwin A Turlach                      Tel.: +61 (8) 6488 3338 (secr)   
School of Mathematics and Statistics        +61 (8) 6488 3383 (self)      
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                e-mail: berwin at maths.uwa.edu.au
Australia                        http://www.maths.uwa.edu.au/~berwin

More information about the R-help mailing list