Skip to content
Prev 61308 / 63424 Next

Unnecessary note when import only used in arg definition

I think the usual rule is that a qualified use of a package is 
sufficient to suppress the warning without any entry in the NAMESPACE 
file.  So if there isn't something else going on, Antoine's example 
illustrates a bug (or at least an inconsistency) in the check code.

Here's a version of your example that doesn't import anything from rlang 
using the NAMESPACE, but uses it in code:

   https://github.com/dmurdoch/imports.example/tree/explicituse

And here's one like Antoine's, where the only use is in a default value:

   https://github.com/dmurdoch/imports.example/tree/defaultvalue

The first one tests clean, the second one gives the note he was talking 
about:

  ? checking dependencies in R code ... NOTE
    Namespace in Imports field not imported from: ?rlang?
      All declared Imports should be used.

Duncan
On 06/02/2023 1:03 p.m., Kevin Ushey wrote: