[R] problem with download.packages

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 6 20:42:42 CEST 2003

On Wed, 6 Aug 2003, David Parkhurst wrote:

> R Version 1.7.0, under windows XP pro
> The help page for update.packages says that {
> `download.packages' takes a list of package names and a
> destination directory, downloads the newest versions of the
> package sources and saves them in `destdir'.  If the list of
> available packages is not given as argument, it is also directly
Not a `list of package names'!

> obtained from CRAN.  If CRAN is local, i.e., the URL starts with
> `"file:"', then the packages are not downloaded but used directly.
> }.
> I tried this (while connected to the internet):
> > download.packages(destdir="\\aq\\R\\updates")
> with this result:
> trying URL `http://cran.r-project.org/bin/windows/contrib/1.7/PACKAGES'
> Content type `text/plain; charset=iso-8859-1' length 12447 bytes
> opened URL
> downloaded 12Kb
> Error in unique(pkgs) : Argument "pkgs" is missing, with no default
> Is there not an inconsistency here?  How can I get this to work?

Yes!  *You* failed to supply a `list of package names'!  I don't suppose
you meant an inconsistency in your message, but there appears to be a
gaping one.

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