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

From: Duncan Murdoch <murdoch.duncan_at_gmail.com>
Date: Sun, 13 May 2012 15:28:36 -0400

On 12-05-13 3:14 PM, Jeroen Ooms wrote:
> On Sun, May 13, 2012 at 10:14 AM, Uwe Ligges
> <ligges_at_statistik.tu-dortmund.de> wrote:
>
>> I do not see any problem in R. If someone is going to import a Namespace, he
>> or she has to do that via import directives in the NAMESPACE file. If
>> someone is going to have a package on the search path, he or she has to
>> require() it. The DESCRIPTION file is used to derive the dependency
>> structures among packages for installation order, check order etc.
>
> I am not sure everyone is aware of this. Many package authors seem to
> be assuming that having a package in the Depends field of the
> DESCRIPTION is a sufficient condition for having the dependency
> package available at runtime, regardless of how the function is
> invoked by the user. I think this is the usual meaning of a
> dependency. There are a lot of packages on CRAN that use Depends and
> are not explicitly importing anything. Among others, this holds for
> any package without a NAMESPACE file.
>
> Also looking at the definition of the 'Depends' field in the 'writing
> r extensions' manual there is not a single hint that Depends is not
> sufficient for having the package available at runtime, and any
> function that is used should still be manually imported or required()
> as you suggest.

What do you suggest as the solution?

Duncan Murdoch



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 13 May 2012 - 19:39:29 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 Sun 13 May 2012 - 20:41:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive