[R-pkg-devel] DBI namespace not found on check

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Feb 1 16:14:01 CET 2022


On Tue, 1 Feb 2022 08:27:54 -0500
Dayne Filer <dayne.filer using gmail.com> wrote:

> I do not directly import or use any DBI functions.

00install.out says:

>> Warning: namespace ‘DBI’ is not available and has been replaced
>> by .GlobalEnv when processing object ‘txp_example_model’

Should the txp_example_model object reference the DBI namespace?

I don't know the "right" solution here, but a similar problem has been
discussed here in R-pkg-devel some time ago:
https://stat.ethz.ch/pipermail/r-package-devel/2022q1/007633.html

You might have to depend on DBI explicitly because your data() object
uses it, but then `R CMD check` might object that you don't explicitly
import anything from it. One admittedly verbose way to work around that
would be to move the data file to inst/ and load it from
data/txp_example_model.R only after loadNamespace('DBI'), like some
data scripts do in the Matrix package.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list