14

I manage the Depends, suggests and imports of the description file. and finally I submit my package to CRAN. But during installation the package, it only install the packages which are deposited under CRAN not for bioconductor packages. besides, it has a package dependencies error for Mac OS: check log for Mac OS

what could be the problem? and how could I fixed it?

Kind regards,

Mikael
  • 985
  • 1
  • 7
  • 6
  • 1
    This would appear to be more appropriately asked on Rd (the r-devel mailing list). – IRTFM Jan 15 '13 at 18:58
  • I respectfully disagree with @DWin here; if there is an error it is on CRAN and such discussions do not belong there and end up being ignored. CRAN has its own email address. – Gavin Simpson Jan 15 '13 at 19:27
  • 2
    @GavinSimpson the first rule of CRAN-club is that you must not talk about CRAN-club. – hadley Jan 15 '13 at 22:59
  • You should consider @chris kennedy answer as the proper one – Marcin Jul 27 '16 at 12:56

3 Answers3

13

In R 3.0.2, the following works:

setRepositories(ind=1:2)

At the time of this writing, the value ind can take a vector with values between 1 and 8, and the following meaning:

1:   CRAN
2:   BioC software
3:   BioC annotation
4:   BioC experiment
5:   BioC extra
6:   Omegahat
7:   R-Forge
8:   rforge.net

This list is obtained by calling setRepositories(graphics=F), which also allows interactively choosing the repositories to be installed from.

krlmlr
  • 25,056
  • 14
  • 120
  • 217
13

This is not documented anywhere but the trick is that you add a line that says biocViews: in your DESCRIPTION file (yes, it ends with a colon and then no need to list anything, you can keep it blank). Then R will know to check bioconductor repositories for the package requirements.

Chris Kennedy
  • 339
  • 4
  • 8
4

There is no mechanism by which install.packages() can install from Bioconductor by default in R (at least not by default, I haven't checked if BioC has the repo infrastructure to allow it if called correctly). [See the comment from Martin Morgan (below) wherein instructions can be found on how to configure R so that install.packages() can install from the Bioconductor repositories.]

To install a Bioconductor package one normally does:

source("http://bioconductor.org/biocLite.R")
biocLite("limma")

which needs to be done independently of install.packages().

The error with Mac OS X checking is potentially a configuration error on that particular server. As @DWin says, you should take this up with CRAN to get to the root of that particular problem. To the best of my knowledge CRAN is supposed to have all the Bioconductor packages installed.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
  • 8
    see `?setRepositories` to select Bioconductor repositories by standard means (and then `install.packages` works) or `install.packages(..., repos=biocinstallRepos())` after the `source` line above to install a Bioconductor package, or `biocLite("foo")` to install `foo` from either CRAN (actually `getOption("repos")`) or Bioconductor. – Martin Morgan Jan 15 '13 at 19:43
  • 1
    You would think that CRAN would be able to fetch and install these packages automatically. From a user's point of view (especially those not completely familiar with R), having to install bioconductor packages separately is indirect and confusing. Why isn't there a solution for this? – Omar Wagih Sep 02 '13 at 11:32