[Bioc-devel] Why can't NAMESPACE be a strict subset of DESCRIPTION Imports?

Martin Morgan martin.morgan at roswellpark.org
Tue Oct 4 23:09:27 CEST 2016


On 10/04/2016 05:07 PM, McDavid, Andrew wrote:
> BiocCheck throws a warning when a package is listed as Imports: in DESCRIPTION but not used in the NAMESPACE.  This may happen when a developer uses the fully qualified names of objects within a package.  I am unclear as to the rationale for this warning.
>

agree it's wrong. can you point to an example? Martin

> Per Hadley:
>
> It's common for packages to be listed in Imports in DESCRIPTION, but not in NAMESPACE. In fact, this is what I recommend: list the package in DESCRIPTION so that it's installed, then always refer to it explicitly with pkg::fun(). Unless there is a strong reason not to, it's better to be explicit. It's a little more work to write, but a lot easier to read when you come back to the code in the future.
>
> Per R extensions:
>
> If a package only needs a few objects from another package it can use a fully qualified variable reference in the code instead of a formal import. A fully qualified reference to the function f in package foo is of the form foo::f.
>
> -Andrew
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>


This email message may contain legally privileged and/or...{{dropped:2}}



More information about the Bioc-devel mailing list