[R-pkg-devel] Using another package's method that isn't exported

Stuart Lacy stuart.lacy at york.ac.uk
Fri Nov 10 10:42:12 CET 2017


Hi,

Yesterday I released the initial submission of my package 'epitab' to 
CRAN https://cran.r-project.org/web/packages/epitab/index.html. On my PC 
and on win_builder it passed CMD CHECK without any notes, warnings, or 
submissions. However,  the built version has a note on some 
architectures, that I have some namespaces in Imports in my DESCRIPTION 
that are not actually imported from. 
https://cran.r-project.org/web/checks/check_results_epitab.html

This is because my code uses the confint.glm method from MASS, so I add 
MASS to my Imports. However, the actual confint.glm method is not an 
exported function from MASS, and so in the code I never actually run 
MASS::confint.glm(mod), I just run the generic stats::confint(mod) on a 
glm object. I understand that to fix this note I need to explicitly use 
the imported MASS package, but I can't see how if I can't manually call 
the function that I'm using.

The other package that I've Imported without explicitly using is `xml2`, 
as win-builder threw up an error with "undefined exports" for various 
xml functions, that adding xml2 to the Imports fixed. 
https://win-builder.r-project.org/G6RKiYtBQqaH/00check.log I didn't have 
any issue with xml2 on Linux.

Thanks,
Stuart

-- 
Stuart Lacy
Research Fellow
Epidemiology and Cancer Statistics Group
University of York
01904 321118
Disclaimer: http://www.york.ac.uk/docs/disclaimer/email.htm



More information about the R-package-devel mailing list