[R] Downloading zip files

Marc Schwartz MSchwartz at mn.rr.com
Mon Oct 31 02:08:39 CET 2005


On Mon, 2005-10-31 at 13:38 +1300, 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.
> 
> Cheers,  Murray Jorgensen

Murray, 

See ?install.packages for more information and also R Windows FAQ
section 4 on Packages.

On that same help page is download.packages() which will download, but
not install, packages into a target directory, if that is an option that
you prefer, since the ZIP files will generally consume less space then
actually installing them if not needed.

You can use install.packages() from the command line to install any CRAN
packages that are available and then use update.packages() to keep the
installed packages updated as they become available.

If you want to install all CRAN packages that you do not currently have
installed, you can use:

  install.packages(new.packages(), dependencies = TRUE)

All available CRAN packages that do not require third party libraries on
your system should be installed. I am not sure what the count on Windows
would be, but for me on Linux, including the base R packages, I end up
with 624 packages installed, which takes about 650 Mb.

HTH,

Marc Schwartz




More information about the R-help mailing list