That is very straightforward. Change
Depends: pkgA, pkgB, pgC
to
Imports: pkgA, pkgB, pgC
and also add this to the NAMESPACE
file:
import("pkgA")
import("pkgB")
import("pkgC")
which will globally import all exported symbols so you can continue as before.
You can also selectively import via
importFrom("pkgA", "func1", "func2", "func3")
and if you run R CMD check
it will actually (very helpfully) tell you which functions need this. The second method is somewhat more precise but a little more work to set up.
And I don't think we have a tool to remove 'spurious imports'. Finding which imports may be unused may be something you have to check manually (but trying to remove one and seeing if it still builds + checks fine).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…