Skip to content
Prev 8991 / 12125 Next

[R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package

Really.Whats a problem i have when all dependencies arent prei installed. I thought the problem would be solved once my package is available on CRAN.


Here is a recent question I had regarding the same issue:


I am currently working on a r-package. I would like to submit my r package to CRAN, but I have a question regarding dependency installations on CRAN.

I have almost finished my package, added the required dependencies to the NAMESPACE and DESCRIPTION files as Imports, and get no errors or warnings

when running the check in Rstudio. The package runs on the pc, where I?ve built the package, but when I install the package on a pc, where the dependencies

are not preinstalled, I get the following error:

ERROR:

dependencies 'depth', 'geometry' are not available for package 'packagename'
* removing 'C:/Users/156932/AppData/Local/Programs/R/R-4.2.1/library/packagename'
Warning in install.packages : installation of package ?packagename? had non-zero exit status


The problem is that a local installation of my package (via USB-stick for example) can?t install the dependencies from CRAN.

The package works perfectly fine, if the dependencies are preinstalled.

Now I don?t want to submit my package to CRAN if the end user gets the same error message when installing my package.

Question: After I submit my package to CRAN, will CRAN install dependencies automatically (via "install.packages()"), resolving the issue I have right now?

Or do I have to modify the R-package or the Description-file to make sure my Package can install dependencies?

I provided the dependencies to the NAMESPACE-file as @ImportFrom via the devtools::document()-function. I added the dependencies to the DESCRIPTION-file via usethis::use_package("x",type="Imports"). The Description looks like this:

License: GPL (>= 3)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
Imports:
    depth,
    geometry,
    graphics,
    grDevices,
    MASS,
    mvtnorm,
    nlme,
    rgl,
    stats



So I thought all dependencies would install automatically from CRAN? Is that not the case?

Thread (32 messages)

Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Tiago Olivoto How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Duncan Murdoch How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Tiago Olivoto How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Tiago Olivoto How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Martin Morgan How to declare Bioconductor Dependencies in the Description File of my R Package Mar 16 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Duncan Murdoch How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Duncan Murdoch How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Uwe Ligges How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Uwe Ligges How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Duncan Murdoch How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Simon Urbanek How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 17 Berry Boessenkool How to declare Bioconductor Dependencies in the Description File of my R Package Mar 18 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 18 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 20 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 20 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 20 Ruff, Sergej How to declare Bioconductor Dependencies in the Description File of my R Package Mar 20 Ivan Krylov How to declare Bioconductor Dependencies in the Description File of my R Package Mar 20