Re: [Rd] chooseCRANmirror() (PR#14179)

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu, 07 Jan 2010 13:35:43 +0000 (GMT)

Hmm, have you read getCRANmirrors? It works gracefully if the connection is down, and has been tested quite a lot ....

It seems you got a corrupt read from the URL: that's not reproducible and the place to deal with that is getCRANmirrors.

Please do use an informative subject line: it makes things *much* easier to find in archives.

On Wed, 6 Jan 2010, chrishold_at_psyctc.org wrote:

> Full_Name: Chris Evans
> Version: 2.10.1
> OS: Windows XP sp3
> Submission from: (NULL) (86.159.235.204)
>
>
> I was on leave and using a wifi internet connection in France and got connected,
> launched R (2.10.1 on Windoze XPsp3) and tried to update my packages and got:
>
>> chooseCRANmirror()
> Error in m[, 1L] : incorrect number of dimensions
>
> It took me a bit to realise that the message was coming up because the wifi
> connection had dropped. I know it's a small issue but is it possible to produce
> a more informative error message. I can see a bodge of changing chooseCRANmirror
> to:
>
> function (graphics = getOption("menu.graphics"))
> {
> if (!interactive())
> stop("cannot choose a CRAN mirror non-interactively")
> m <- getCRANmirrors(all = FALSE, local.only = FALSE)
> ### bodge added here
> if (ncol(m) != 8) stop("There was a problem with access to CRAN mirrors,
> please check your internet connection")
> ### end of bodge
> res <- menu(m[, 1L], graphics, "CRAN mirror")
> if (res > 0L) {
> URL <- m[res, "URL"]
> repos <- getOption("repos")
> repos["CRAN"] <- gsub("/$", "", URL[1L])
> options(repos = repos)
> }
> invisible()
> }
> <environment: namespace:utils>
>
> However, I'm sure you code gurus can do much better than that.
>
> Many thanks for R: statistical wonderland, coding genius and a social movement
> of which to be hugely proud!
>
> Chris (Evans)
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 07 Jan 2010 - 13:40:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Jan 2010 - 23:00:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive