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)) ? ______________________________________________ R-help@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.