[R] Error in update() when repositories is specified.

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 9 17:47:31 CET 2004


I don't think that has ever been tested under Windows: until recently
packageStatus did not work under Windows at all.

The problem seems to be in ask=FALSE, which looks completely broken.
ask=TRUE seems to work.  This was true of Unix, 1.9.1 as well so I guess 
no one ever uses it ....

On Tue, 9 Nov 2004, Andy Bunn wrote:

> Ooops. Make that subject line 'upgrade', not 'update!' Sorry. -AB
> 
> > -----Original Message-----
> > From: r-help-bounces at stat.math.ethz.ch
> > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Andy Bunn
> > Sent: Tuesday, November 09, 2004 9:23 AM
> > To: R-Help
> > Subject: [R] Error in update() when repositories is specified.
> >
> >
> > How can I specify the repositories for upgrade()?

You will find it easier to use contrib.url() here.

> > > x <- packageStatus(repositories =
> > "http://cran.us.r-project.org//bin/windows/contrib/2.0")
> > > upgrade(x, ask = FALSE)
> > Error in update[, 3] : incorrect number of dimensions
> >
> > x, the object of class "packageStatus", prints and summarizes fine. I also
> > ran install.packages() without incident.
> > > install.packages(x$avail$Package[x$avail$Status == "not installed"])
> >
> > I get the same error if I specify the repositories with getOption:
> > > getOption("repositories")()[[1]]
> > [1] "http://cran.us.r-project.org//bin/windows/contrib/2.0"
> > > x <- packageStatus(repositories = getOption("repositories")()[[1]])
> > > upgrade(x, ask = FALSE)
> > Error in update[, 3] : incorrect number of dimensions
> >
> > However, upgrade behaves if I don't specify "repositories" in
> > packageStatus() things work as expected.
> > > x <- packageStatus()
> > > upgrade(x)
> >
> > I imagine that I am being a dimwit as per usual. Can anybody help?
> >
> > -Andy
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
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