Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: unable to access index for repository https://www.stats.ox.ac.uk/pub/RWin/src/contrib: [duplicate]

Tags:

r

rstudio

From today, every time I try to install a new package on R (3.4.1) with Rstudio 1.0.143 I receive this error message:

Warning: unable to access index for repository https://www.stats.ox.ac.uk/pub/RWin/src/contrib: cannot open URL 'https://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'

I change the CRAN mirror in Global options>packages but it still shows this error. The packages have started downloading from a different server than stats.ox.ac.uk but there is huge delay while R tries to connect to stats.ox.ac.uk. Is this a global problem, or just happening to me? If global, is there a workaround to stop this serror message from showing?

Thanks. Deep (Dwaipayan Adhya)

like image 825
Dwaipayan Adhya Deep Avatar asked Jul 14 '17 17:07

Dwaipayan Adhya Deep


1 Answers

I'm guessing this is a temporary issue (but an annoying one nonetheless and one that I dealt with this morning). That repository is most likely an additional one set alongside the "CRAN" repository as "CRANextra". The solution is to redefine the repos option to not include CRANextra. You can use the setRepositories() command and unselect "CRANextra". Alternatively you could just run the following code which will remove all repositories except the "CRAN" selection.

options(repos = getOption("repos")["CRAN"])
like image 112
Dason Avatar answered Nov 16 '22 08:11

Dason