> chooseCRANmirror()Error in m[, 1L] : incorrect number of dimensions Can someone explain me why I can't choose the cran mirror, but get again and again this error message. Have searched for this on several engines but can't find explanation. Thanks a lot in advance! -- View this message in context: http://r.789695.n4.nabble.com/message-please-select-CRAN-mirror-tp3331711p3331711.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
On 02.03.2011 16:47, Aggita wrote:>> chooseCRANmirror() > Error in m[, 1L] : incorrect number of dimensions > > Can someone explain me why I can't choose the cran mirror, but get again and > again this error message. Have searched for this on several engines but > can't find explanation. > > Thanks a lot in advance! > > -- > View this message in context: http://r.789695.n4.nabble.com/message-please-select-CRAN-mirror-tp3331711p3331711.html > Sent from the R help mailing list archive at Nabble.com. > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Yes, PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Which R version? Which OS? Have you tried with a recent version of R? Uwe Ligges
Aggita <a.strelniece <at> eurotransplant.org> writes:> > > chooseCRANmirror() > Error in m[, 1L] : incorrect number of dimensions > > Can someone explain me why I can't choose the cran mirror, but get again and > again this error message. Have searched for this on several engines but > can't find explanation. >It's hard for us to diagnose this if we can't reproduce it. I will take a shot though. The chooseCRANmirror function looks like this: function (graphics = getOption("menu.graphics")) { if (!interactive()) stop("cannot choose a CRAN mirror non-interactively") m <- getCRANmirrors(all = FALSE, local.only = FALSE) 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() } Looking in the guts of the function, it is clear that it is failing when it looks at the list of mirrors that it has gotten -- this list of mirrors has somehow turned into a vector instead of a matrix. You could use debug(chooseCRANmirror) to step through the function and inspect the value of m just before the function crashes. This is probably the result of some sort of network problem -- you're not getting a decent list of mirrors. What is the result of str(getCRANmirrors(all=FALSE,local.only=FALSE)) ?
str(getCRANmirrors(all=FALSE,local.only=FALSE))gives --> chr(0)
> str(getCRANmirrors(all=FALSE,local.only=FALSE))gives --> chr(0) -- View this message in context: http://r.789695.n4.nabble.com/message-please-select-CRAN-mirror-tp3331711p3334943.html Sent from the R help mailing list archive at Nabble.com.
On 04.03.2011 10:45, Aggita wrote:> > > str(getCRANmirrors(all=FALSE,local.only=FALSE))gives --> chr(0)Not so for me. Your internet settings may be incorrect. If you are using a proxy server and you are under Wwindows, please read the R for Windows FAQs. Uwe Ligges> ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.