Unable to access index for repository error?

Posted by Tommy O'Dell on Stack Overflow See other posts from Stack Overflow or by Tommy O'Dell
Published on 2012-12-11T05:00:59Z Indexed on 2012/12/11 5:03 UTC
Read the original article Hit count: 155

Filed under:

I've just created a package (RTIO) and a package repository (Q:/Integrated Planning/R), which is a company network drive.

I've put my package into the folder:

Q:/Integrated Planning/R/bin/windows/contrib/2.15.1/RTIO_0.1-2.zip

As per Dirk's instructions in this SO, I've run the following commands:

> setwd("Q:/Integrated Planning/R/bin/windows/contrib/2.15.1")
> tools::write_PACKAGES(".", type="win.binary")
> list.files()
[1] "PACKAGES"       "PACKAGES.gz"    "RTIO_0.1-2.zip"
>

With the code below, I've added the local repository to my list of repos (and I'll get other users to do the same):

options(repos = c(getOption("repos"), RioTintoIronOre = "Q:/Integrated Planning/R"))

And now trying to install my package I get an error:

> install.packages("RTIO")
Installing package(s) into ‘C:/Program Files/R/R-2.15.1/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository Q:/Integrated Planning/R/bin/windows/contrib/2.15
Warning in install.packages :
  unable to access index for repository Q:/Integrated Planning/R/bin/windows/contrib/2.15
Warning in install.packages :
  unable to access index for repository Q:/Integrated Planning/R/bin/windows/contrib/2.15
Warning in install.packages :
  package ‘RTIO’ is not available (for R version 2.15.1)

What does unable to access index for repository tell me? And how can I fix it?

What I'm really looking to do is to do, under Windows and with RStudio as the IDE, is to let other internal R users add this package repo such that they're able to run commands like install.packages("RTIO") or update.packages() (and presumably use the IDE to manage packages via the GUI)?

© Stack Overflow or respective owner

Related posts about r