Le 09/11/2023 à 08:01, Claborne, Daniel via R-package-devel a écrit :
I have a data package �pmartRdata� hosted in a drat repository here:  
https://github.com/pmartR/drat following the instructions here:  
https://cran.r-project.org/web/packages/drat/vignettes/DratStepByStep.html

The package installs fine via install.packages(�pmartRdata�, repos = 
�https://pmartR.github.io/drat�).  I have included it under Suggests and added 
�https://pmartR.github.io/drat� to the Additional_repositories field in the 
DESCRIPTION of a package I am submitting to CRAN.  I�m getting failures on 
Debian/R-devel and Windows/R-devel when running examples that use this package:

`Error in library(pmartRdata) : there is no package called �pmartRdata�`

Checks on rhub via `rhub::check_for_cran` for ubuntu,fedora, and windows do not 
have this problem.  What do I need to do to get it to install on CRAN 
submission machines?

Generally, you cannot assume that suggested package is available on CRAN (or any other) machine. Instead, you have to put the code involving suggested package inside an 'if()' clause, like:

if (requireNamespace("pkg", quietly=TRUE) {

   pkg::do_something()

}


Best,
Serguei.



Best,
-Daniel Claborne

        [[alternative HTML version deleted]]


______________________________________________
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