[R-pkg-devel] Import package countreg that is not on CRAN

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Fri Nov 13 12:14:36 CET 2020


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



More information about the R-package-devel mailing list