From sfalcon at fhcrc.org  Tue Jun  6 16:31:22 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Tue, 06 Jun 2006 07:31:22 -0700
Subject: [Rd] 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")
References: <C0AAEEBC.C8DB%sdavis2@mail.nih.gov>
Message-ID: <m2mzcqxsn9.fsf@ziti.local>

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



[Rd] Editing a package with a NAMESPACE in place
Seth Falcon