Thanks,

So is it just necessary for suggested packages.


So, is it just good practice to make a conditional check?

I saw some packages still include it.


For example the Seurat package.


Under Utils.R (line 349-379) of the SeuratObject-Package 
(https://cran.r-project.org/src/contrib/Archive/SeuratObject/) you will find 
the PackageCheck-function

which used by the Seurat-Package 
(https://cran.r-project.org/src/contrib/Archive/Seurat/) to check if packages 
are alredy installed.

You can find examples for DEseq2 under differential_expression.R (starting line 
1314 or you cntr+f for packagecheck) in the Seurat.package 
(https://cran.r-project.org/src/contrib/Archive/Seurat/)

or for limma (starting line 2292).



________________________________
Von: Duncan Murdoch <murdoch.dun...@gmail.com>
Gesendet: Mittwoch, 3. Mai 2023 14:25:56
An: Ruff, Sergej; Ivan Krylov
Cc: r-package-devel@r-project.org
Betreff: Re: [R-pkg-devel] How to declare Bioconductor Dependencies in the 
Description File of my R Package



On 03/05/2023 8:00 a.m., Ruff, Sergej wrote:
... [ lines about current solution deleted ]

> Also for the future - how Do i provide Bioconductor dependencies as "Imports" 
> for a package that I want to submit to CRAN?

Just list it as you would a CRAN package.  The CRAN docs talk about
"mainstream repositories"; I forget what the definition is of that
(maybe repositories listed in `file.path(R.home(),
"etc/repositories")`?), but definitely BioConductor is included.

> Do I need to make that also conditional? I know I should provide Installation 
> description in a readme fiel but how do I make sure

No, you don't need to check.  If any imported package is not available,
your package will not load, so errors will happen before you ever get to
running examples.

> that the Bioconductor dependencies dont cause a rejection from CRAN?

Just make sure they exist on BioC and your code works with them.

Duncan Murdoch


        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to