[R-pkg-devel] How to account for optional packages not necessarily on CRAN

Balasubramanian Narasimhan n@r@@ @end|ng |rom @t@n|ord@edu
Wed Dec 11 02:22:51 CET 2019


We've run into the following problem in integrating commercial and open 
source solvers in to our package CVXR. We have "Suggests" dependency on 
some packages that may not be available to CRAN.

There are two main scenarios.

1. A suggested meta-package is on CRAN, e.g. Rmosek, but the user must 
further take action to ensure the binary is installed.  The recommended 
requireNamespace("Rmosek", quietly = TRUE) is insufficient to guarantee 
the functionality desired even if it succeeds.

2. A suggested package is on github or a commercial vendor site only. 
The package code has references to such packages in the code, causing 
problems while checking on CRAN.

It would seem, at least for 2 above, that separating the suggested 
functionality into other packages can ensure that birds of the same 
feather can flock together. But the shared internals make this 
impossible to do at the moment.

The only thing I can think of is to ask CRAN to consider 
_R_FORCE_CHECK_SUGGESTS_= 0 for such a package. Am I missing anything?

Thank you.

-Naras



More information about the R-package-devel mailing list