I'm following Hadley's guide to implement a DBI backend, which instructs me to build S4 classes that inherit from DBI classes.
From the instructions, to make the DBI classes available, it seems that I only have to list DBI
as an import in the DESCRIPTION
file.
However, even after doing so, I still get the error
Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses, :
no definition was found for superclass “DBIDriver” in the specification of class “KazamDriver”
If I explicit attach DBI
with library
then this problem go away, but of course one shouldn't use library
in package code.
My code:
# DBI-backend.R
setClass("KazamDriver", contains = "DBIDriver")
# DESCRIPTION
Imports:
DBI (>= 0.3.0),
methods