Skip to content
Back to formatted view

Raw Message

Message-ID: <m2mzcqxsn9.fsf@ziti.local>
Date: 2006-06-06T14:31:22Z
From: Seth Falcon
Subject: Editing a package with a NAMESPACE in place
In-Reply-To: <C0AAEEBC.C8DB%sdavis2@mail.nih.gov> (Sean Davis's message of "Tue, 06 Jun 2006 08:35:08 -0400")

Sean Davis <sdavis2 at mail.nih.gov> writes:

> On 6/6/06 8:33 AM, "Uwe Ligges" <ligges at statistik.uni-dortmund.de> 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.

For simple packages, removing the NAMESPACE file will work well and is
certainly very convenient.  However, with more complex packages (in
terms of dependencies and S4 stuff) it may not work so well:

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

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

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

Cheers,

+ seth