Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second & subsequent calls to function fails. Please help debug.)

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sun, 30 Mar 2008 13:25:05 -0400

On 30/03/2008 11:31 AM, Gabor Grothendieck wrote:
> On Sun, Mar 30, 2008 at 9:43 AM, Duncan Murdoch <murdoch@stats.uwo.ca> wrote:

>> In my opinion, all packages should have namespaces, and I'd like to
>> create a default one if the author doesn't.  (The default would be:
>> import what is listed in the Depends clause, export everything.)  I
>> don't think this will happen for 2.7.0, though package.skeleton might
>> start creating one.

>
> Namespaces are such a pain when you don't really need them though.

I would say there is no such case. Packages all import functions. Having the imports change because of unrelated code means that there is no way to write reliable code.

> Its nice just to be able to source a new version of a function and have
> it immediately work with the package. Particularly for packages that
> are changing or for which there is substantial code changes in the
> devel version this is very convenient and namespaces interefere with that.

That sounds like a problem with the way we handle package code, making it too hard to reload a package that has had small changes made. We should make it easy to make a small change to a package and reload the modified version.

> Although its possible to have namespace problems as discussed in this
> thread I have found that it rarely actually happens and certainly not enough
> to impose it.

I suspect it happens more than people realize, and that in some cases they just get the wrong answers, without any helpful error message to let them know about it.

Duncan Murdoch



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 30 Mar 2008 - 18:03:48 GMT

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 30 Mar 2008 - 18:30:26 GMT.

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

list of date sections of archive