[R-pkg-devel] Seamless way for a CRAN-bound package to depend on a Bioconductor package?
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
## 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
BioCann "BioC annotation" %bm/packages/%v/data/annotation FALSE TRUE
BioCexp "BioC experiment" %bm/packages/%v/data/experiment FALSE TRUE
BioCextra "BioC extra" %bm/packages/%v/extra FALSE 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
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
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
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
I'd say it is not.
| Thanks in advance,
| 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
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-package-devel