Re: [Rd] NAMESPACE

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sun, 17 Jul 2011 08:06:12 -0400

On Sun, Jul 17, 2011 at 7:58 AM, Duncan Murdoch <murdoch.duncan_at_gmail.com> wrote:
> On 11-07-16 10:13 PM, Gabor Grothendieck wrote:
>>>
>>> Packages without explicit ‘NAMESPACE’ files will have a default one
>>> created at build or INSTALL time,
>>> so all packages will have namespaces. A consequence of this is that
>>> ‘.First.lib’ functions need to be
>>> renamed, usually as ‘.onLoad’ but sometimes as ‘.onAttach’.
>>
>> Couldn't R simply regard .First.lib as the appropriate function to
>> save many packages from
>> being needlessly changed?
>>
>
> It is doing that (see today's version of the NEWS), but the problem is that
> it may choose the wrong one.  If your package requires initialization then
> yourpkg::somefun only works if the initialization happens in .onLoad.  But
> some packages only work if the initialization happens when the package is
> attached.  It's better for the author to make the choice than for R to do it
> automatically.

OK. Thanks.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sun 17 Jul 2011 - 12:08:17 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 18 Jul 2011 - 11:50:09 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