[R-pkg-devel] package dependencies not detected?

Duncan Murdoch murdoch.duncan at gmail.com
Wed Aug 16 15:44:50 CEST 2017


On 16/08/2017 8:31 AM, Dirk Eddelbuettel wrote:
>
> On 16 August 2017 at 12:51, peter dalgaard wrote:
> | > On 16 Aug 2017, at 11:11 , Berry Boessenkool <berryboessenkool at hotmail.com> wrote:
> | >
> | > if a function in a package uses graphics::legend in the code, but does not import it in the namespace, shouldn't there be a warning in the check?
> | >
> |
> | Er, no... Importing into a namespace is used to avoid the graphics:: qualifier. This is conceptually different from having a dependency.
>
> Exactly, but IIRC we get warnings on packages not listed in Suggests: which are
> accessed via '::'.  And that need for a Suggests: goes away for a base package.

s/Suggests/Imports/g

>
> Otherwise Peter's reminder is entirely correct. You can do _either_ an
>   importForm("graphics", "plot", "legend") in NAMESPACE (which I have done)
> or use the explicit
>   graphics::legend
> you have.
>
> Dirk
>



More information about the R-package-devel mailing list