My package doesn't work for R 2.15.2
r
Solution
Unfortunately, neither the help files or the error message explained why this error was occurring. As it turns out, `install.packages()` also fails when the source package is not available, but the binary does. This is not documented behaviour (or more generously - it is not clearly documented):
For binary installs, the function also checks for the availability of a source package on the same repository, and reports if the source package has a later version, or is available but no binary version is. This check can be suppressed by `options(install.packages.check.source = "no")`
To fix, `options(install.packages.check.source = FALSE)`. This can also be included in your `.First` function.
Problem
I have a package called `rpackage` on a local (corporate) repo. When I run `install.packages("rpackage")` it tells me that: ``` Installing package(s) into ‘C:/Program Files/R/R-2.15.2/library’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘rpackage’ is not available (for R version 2.15.2) ``` I have built this package using `R CMD INSTALL --build .` , released to the local repo and also ran `tools::write_PACKAGES()` to update the `PACKAGES` files. When I run `R --version` I get: ``` R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-w64-mingw32/i386 (32-bit) ``` And when I run `R CMD INSTALL --build --version` I get: ``` R add-on package installer: 2.15.2 (r61015) ``` The local repo directory structure follows the official documentation and has been working until I updated to R 2.15.2. The structure is: ``` \\server\folder\R\bin\windows\contrib\ 2.11\ 2.12\ 2.13\ 2.14\ 2.15\ \\server\folder\R\src\contrib\ ``` If I run `install.packages("rpackage")` in R 2.15.1 I have no problems. Is there something special I need to do to get it to work with the new version of R? I noticed the CRAN servers use a slightly different directory structure. For example, the CSIRO CRAN mirror uses: ``` http://cran.csiro.au/bin/windows/contrib/r-release/ ``` Any idea about how to fix this? Many thanks.