Yes, thanks, I missed that option.

On 13/11/2020 10:11 a.m., Henrik Bengtsson wrote:
You can change your package from using:

   Imports: countreg

to use:

   Suggests: countreg

For this to work, you'll have to update your code, package tests,
examples, and vignettes, to run conditionally on 'countreg' being
installed, e.g.

if (requireNamespace("countreg", quietly = TRUE)) {
   ...
}

Whether or not this makes sense depends on how central 'countreg' is
to your package.  If it is only needed optionally and for a small part
of your functionality, then it's doable but if it's a mission-critical
dependency, it might be too much of a hack.

This is in compliance with CRAN and in agreement with what Uwe says too.

I've used this myself in for instance
https://cran.r-project.org/web/package=aroma.core where small parts of
the functionality depend on packages not in the mainstream (= CRAN &
Bioconductor) repositories. This allows those who wish to use
alternative methods, if they want to go the extra mile to install
them.  Also, if they're popular enough it might nudge the maintainers
of those enough to submit to CRAN or Bioconductor - a process that
might take years, if at all.

/Henrik

On Fri, Nov 13, 2020 at 3:23 AM Duncan Murdoch <murdoch.dun...@gmail.com> wrote:

On 13/11/2020 3:10 a.m., Jason Luo wrote:
Hi,

I'm submitting a new package (https://github.com/Penncil/pda/) to CRAN. It
relies on some function (zerotrunc and hurdle in R/ODAP.R) from countreg (
https://rdrr.io/rforge/countreg/) , which is not on CRAN. The submission
returns error as below

https://win-builder.r-project.org/incoming_pretest/pda_1.0_20201113_083442/Debian/00check.log

Seems the r-forge repo is identified in the DESCRIPTION
Additional_repositories, but countreg is still not available. I assume this
is not a rare problem but didn't find useful solutions online. Any
suggestions? Thanks!

If countreg is not in one of the mainstream repositories (CRAN or
Bioconductor), then it may not have been subject to careful testing, so
CRAN sees it as unreliable.  Since your package depends on it, yours is
also unreliable, so CRAN won't publish it.

I don't know anything about the pda or countreg packages, so this is
general advice on what you could do, and may not be applicable here:

    - you could take over maintenance of countreg (if its current
maintainer agrees), and put in the work to get it on CRAN.
    - you could copy parts of countreg to your own package (if its
license allows that), and drop your dependence on it.
    - you could substitute some other CRAN package that provides
equivalent functionality and depend on that instead.
    - you could drop the parts of your package that need countreg, and
submit a smaller package to CRAN without that dependency.
    - you could publicize that your package is on Github, and give up on
publishing it on CRAN.

Duncan Murdoch

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

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

Reply via email to