5

Problem:

I am developing an R package and one of the dependent packages is multtest. It's only available on Bioconductor as here. I am using devtools to build the package. And, when I run devtools::install() on R console, I would like multtest to automatically install as with my other CRAN packages if it is not already installed. I do know how to install Bioconductor packages manually.

Researched Solutions:

The following links suggest that I should put

biocViews:

in the Description file of the package for automatic installation of the Bioconductor packages.

  1. biocViews: is in the line above Imports: (I am not sure where it is placed matters as much?) and the Bioconductor package to be installed is put under Imports: as here

  2. biocViews: is in the line above Imports: and the Bioconductor package to be installed is put right after like biocViews: multtest. This exact answer is at the end of a non-voted thread in response to Vivian by Vivekbhr as here

I have also followed up and checked the description file of the packages which rely on Bioconductor as here

Attempted Solutions:

I have followed those research solutions by putting multtest along with biocViews:, below biocViews:, under Imports:. All of them came back with package dependency or package not found errors as in the pictures below.

  1. biocViewsinOneLine
  2. biocViewsinSeparateLine
  3. biocViewsunderImports

Then, I manually re-installed multtest and it works. However, I still would like to have the automatic installation capability as mentioned here under the Imports section in Hadley's book as here

Is it possible? Am I misunderstanding something or doing something wrong?

Thank you very much!

Zarni
  • 109
  • 6
  • 1
    Hi! Did you maybe solve this issue? – John Jul 01 '20 at 01:39
  • @John, unfortunately, I haven't gotten back around to this project yet though hoping to get back mid-summer! Are you facing something similar? – Zarni Jul 01 '20 at 20:30
  • 1
    Adding the `biocViews` did the trick for me but didn't use it in the end for other reasons – John Jul 01 '20 at 23:55

3 Answers3

0

I have tried your 3rd method, and it could pass the CMD check. Maybe update your devtools?

Wang
  • 1,314
  • 14
  • 21
0

You need to add multtest under Imports in DESCRIPTION.

However, as `multtest' is from Bioconductor link, add to DESCRIPTION

biocViews: Software, BiologicalQuestion

0

The recommended way (for developers) to install packages with Bioconductor dependencies from GitHub is to use BiocManager::install("username/pkgRepo", dependencies = TRUE). devtools does not use the appropriate repos argument for Bioconductor packages AFAICT.

As with any package, whether it be in Bioconductor or on CRAN, include multtest in the Imports field.

Do not use the biocViews field unless it is a Bioconductor package that you are developing.

Marcel
Bioconductor Core Team

mr148
  • 103
  • 6