[R-pkg-devel] Using another package's method that isn't exported
stuart.lacy at york.ac.uk
Fri Nov 10 10:42:12 CET 2017
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.
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.
Epidemiology and Cancer Statistics Group
University of York
More information about the R-package-devel