[R-pkg-devel] Seamless way for a CRAN-bound package to depend on a Bioconductor package?

Dirk Eddelbuettel edd at debian.org
Fri Jul 28 14:52:55 CEST 2017


On 28 July 2017 at 12:42, Pavel Krivitsky wrote:
| Dear All,
| 
| There is a Bioconductor package (S4Vectors) whose functionality I want
| to use in one of my packages, which I usually submit to CRAN.
| 
| At this time, install.packages() does not automatically fetch
| dependencies from Bioconductor as far as I can tell, though it can be
| told to do so via setRepostitory().
| 
| Is there any way to make it more seamless for the end-user?

It's there all along, see from the sources (and sorry for the linewrap):

edd at bud:~/svn/r-devel$ cat etc/repositories
## The fields here are tab-delimited: there is a row name
## menu_name    is the name to be used in setRepositories()
## URL          is the base URL (see R-admin.texi)
## default      is whether this should be a default choice
## source, win.binary, mac.binary   indicate if the corresponding type is 
present
##
## BioC entries are version-specific, with %v getting expanded to the
## BioC version associated with the current R version.
## Also, %bm is substituted from the setting of getOption("BioC_mirror")
##
menu_name       URL     default source  win.binary      mac.binary
CRAN    CRAN    @CRAN@  TRUE    TRUE    TRUE    TRUE
BioCsoft        "BioC software" %bm/packages/%v/bioc    FALSE   TRUE    TRUE
TRUE
BioCann "BioC annotation"       %bm/packages/%v/data/annotation FALSE   TRUE
TRUE    TRUE
BioCexp "BioC experiment"       %bm/packages/%v/data/experiment FALSE   TRUE
TRUE    TRUE
BioCextra       "BioC extra"    %bm/packages/%v/extra   FALSE   TRUE    TRUE
TRUE
CRANextra       CRAN (extras)   https://www.stats.ox.ac.uk/pub/RWin     FALSE
TRUE    TRUE    TRUE
Omegahat        Omegahat        http://www.omegahat.net/R       FALSE   TRUE
FALSE   FALSE
R-Forge R-Forge https://R-Forge.R-project.org   FALSE   TRUE    TRUE    TRUE
rforge.net      rforge.net      https://www.rforge.net  FALSE   TRUE    TRUE
TRUE
edd at bud:~/svn/r-devel$

But you simply cannot ensure that users have it enabled.

| I know that there is the 'Additional_repositories:' setting, but I
| think that's for R CMD check only: although devtools::install()
| understands it and the 'biocView:' setting, install.packages() does
| not.

You can use that for suggsted packages, see Anderson and Eddelbuettel in the
current issue of the R Journal for more.

| Another option might be to make it a Suggested package and then force
| its installation (if necessary) and loading in the .onLoad() function
| of my package, but it's not clear whether that's CRAN-appropriate
| behaviour.

I'd say it is not.

Dirk
| 
| 				Thanks in advance,
| 				Pavel
| 
| 
| 
| 
| -- 
| Pavel Krivitsky
| Lecturer in Statistics
| National Institute of Applied Statistics Research Australia (NIASRA)
| School of Mathematics and Applied Statistics | Building 39C Room 154
| University of Wollongong NSW 2522 Australia
| T +61 2 4221 3713
| Web (NIASRA): http://niasra.uow.edu.au/index.html
| Web (Personal): http://www.krivitsky.net/research
| ORCID: 0000-0002-9101-3362
| 
| NOTICE: This email is intended for the addressee named and may contain
| confidential information. If you are not the intended recipient, please
| delete it and notify the sender. Please consider the environment before
| printing this email.
| ______________________________________________
| R-package-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-package-devel mailing list