Re: [Rd] R package dependency issues when namespace is not attached

From: Jeroen Ooms <>
Date: Sun, 13 May 2012 13:53:49 -0700

On Sun, May 13, 2012 at 1:06 PM, Martin Morgan <> wrote:
> On 05/13/2012 12:14 PM, Jeroen Ooms wrote:
> As a package developer, I want to have the code my package sees be exactly
> what is needed, and no more.

Exactly. That is why you probably don't use Depends, but Imports in combination with a NAMESPACE file. Which is great, and we should encourage that practice. But as long as 'Depends' is also supported, this should be working properly as well.

Here a quote from "A stronger form of dependency can be specified in the optional Depends field listing packages which are necessary to run our code."

It think it seems reasonable to assume that when a package author decides to use 'Depends' (for whatever reason), they want the namespace to be available to their package. Hence I think R should import the full namespace of packages in the Depends field. I don't think this will generate too much overhead, because in most circumstances, the package will be loaded and attached anyway. Furthermore this will not slow down or affect packages that use the better practice of specifying 'Imports' instead of 'Depends' and explicitly import only required symbols. mailing list Received on Sun 13 May 2012 - 21:00:18 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 May 2012 - 11:21:21 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive