From sdavis2 at mail.nih.gov  Tue Jun  6 14:35:08 2006
From: sdavis2 at mail.nih.gov (Sean Davis)
Date: Tue, 06 Jun 2006 08:35:08 -0400
Subject: [Rd] Editing a package with a NAMESPACE in place
In-Reply-To: <44857636.6090903@statistik.uni-dortmund.de>
Message-ID: <C0AAEEBC.C8DB%sdavis2@mail.nih.gov>




On 6/6/06 8:33 AM, "Uwe Ligges" <ligges at statistik.uni-dortmund.de> wrote:

> Sean Davis wrote:
>> I would like to edit a function from a package that uses a NAMESPACE, but in
>> place (after the package is loaded).  As a simple example, I would like to
>> add a browser() call to a line in one of the functions for debugging
>> purposes.  Since the function is in the package namespace, I can't do that
>> directly by simply making a copy of the function and editing it--that copy
>> doesn't get used.  I tried assigning into the package environment, but it is
>> locked, it appears.  How do I go about doing this without changing the
>> package source, then reinstalling and reloading?
>> 
>> Thanks,
>> Sean
>> 
> 
> 
> 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.

Sean



[Rd] Editing a package with a NAMESPACE in place
Sean Davis