Re: [Rd] Editing a package with a NAMESPACE in place

From: Martin Maechler <>
Date: Tue 06 Jun 2006 - 15:08:26 GMT

>>>>> "Seth" == Seth Falcon <> >>>>> on Tue, 06 Jun 2006 07:31:22 -0700 writes:

    Seth> Sean Davis <> writes:
>> On 6/6/06 8:33 AM, "Uwe Ligges"
>> <> wrote:

    >>> See ?assignInNamespace and ?fixInNamespace

>> Thanks, Uwe. I should have been able to find those,
>> but....
    >>> During developing, I suggest to remove the NAMESPACE
    >>> temporarily.

>> I wondered if that was common practice.
    Seth> For simple packages, removing the NAMESPACE file will
    Seth> work well and is certainly very convenient.  However,
    Seth> with more complex packages (in terms of dependencies
    Seth> and S4 stuff) it may not work so well:

    Seth> * You won't be testing the _real_ package (this is a     Seth> problem regardless of complexity I suppose).

    Seth> * Without the NAMESPACE, you may get the wrong
    Seth> functions and see all sorts of breakage.  IOW, some
    Seth> packages rely on the NAMESPACE to function properly;
    Seth> removing it does more than just exposing private
    Seth> functions.

    Seth> In practice I tend not to follow my advice :-/.  What
    Seth> I often do is the equivalent of source() on the
    Seth> required .R files while I'm fixing a particular
    Seth> function or method. But I do make sure to go through     Seth> an INSTALL/test cycle (with NAMESPACE) frequently.

I'm quite similar to Seth here. For that reason (and because Doug Bates also behaves similarly here, and we talked about it !), if you use R 2.3.0 or newer,

will provide the function sourceDir(), so you can do



    Seth> Cheers,

    Seth> + seth

    Seth> ______________________________________________
    Seth> mailing list     Seth> mailing list Received on Wed Jun 07 02:36:22 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 06 Jun 2006 - 18:19:38 GMT.

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