Skip to content
Prev 19233 / 21318 Next

[Bioc-devel] Package checks with WARNING

On 12/10/2022 13:42, Lapuente Santana, Oscar wrote:

            
I see. But still, you're only supposed to import what your code uses 
_directly_. In this case your code doesn't make any call to coin or 
doesn't use any symbol defined in coin. The code in rstatix does, but 
not your code.

One concern is that you want to make sure that coin is installed on the 
user machine, so it needs to be listed as a dependency. One way to 
achieve this is to move coin to Depends, and to not import anything from 
it. I just tried this but R CMD check now produces:

 ? * checking dependencies in R code ... NOTE
 ? Package in Depends field not imported from: ?coin?
 ? ? These packages need to be imported from (in the NAMESPACE file)
 ? ? for when this namespace is loaded but not attached.

IMO this is actually a legitimate use of Depends, so I'd say it's ok. At 
least now you get a NOTE instead of a WARNING ;-)

A more hacky solution is to keep coin in Imports and to import an 
arbitrary symbol from it. Could be anything, except 'wilcox_test' of 
course, to avoid the clash with importFrom(rstatix,wilcox_test). That 
should produce a clean R CMD check.

Hope this helps,

H.