[R] Downloading zip files

Duncan Murdoch murdoch at stats.uwo.ca
Mon Oct 31 02:38:17 CET 2005


Murray Jorgensen wrote:
> I have not had a great amount of success installing/updating packages 
> from the "Packages" menu of Rgui under Windows XL. (Except for 
> installing from loacal zip files.)
> 
> But I am not asking for help in using these facilities because I prefer 
> to keep a folder of package zip files. On the other hand I do find it 
> tedious having to right-click "Save link as" on every individual file 
> from CRAN.
> 
> I'm sure someone knows a faster way to do it.

You probably want to use "wget".  I think a "recursive web suck" would 
suck down a whole directory from CRAN in one command:

wget -r -l1 http://cran.<mirror>.r-project.org/bin/windows/contrib/2.2/

will get all the contents of the Windows 2.2 binary directory, plus a 
bit of other junk.  You want the -l1 to limit yourself to things 
directly referenced on that page, otherwise you'll get all of CRAN.

wget is available in various places on the web; I forget where I got my 
copy.

I think there are options in various browsers to do the same thing, but 
I haven't used them.

Duncan Murdoch




More information about the R-help mailing list