Re: [Rd] RE: [R] debugging non-visible functions

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu 14 Oct 2004 - 00:09:14 EST

On Wed, 13 Oct 2004 11:38:00 +0100 (BST), Prof Brian Ripley <ripley@stats.ox.ac.uk> wrote :

>> > From: Prof Brian Ripley
>> [snip]
>> > Luke Tierney recommends removing the NAMESPACE file during
>> > development of
>> > a package if you need frequent access to debug/change its functions.
>>
>> But isn't that a bit troublesome if there is a shared object to be loaded in
>> the NAMESPACE file? If I rename the NAMESPACE file to something else, I
>> would need to put back library.dynam() in .First.lib(), right? I thought it
>> might work to write some code in .First.lib that checks for existence of
>> NAMESPACE, and call libaray.dynam() conditionally. Does this sound about
>> right?

For 2.1.0, would it be reasonable to extend debug() the way ? was extended? E.g. allow

ink1">debug(plot(x))

and have the debugging flag be set on the appropriate function, whatever and wherever it happens to be? There's some ambiguity with S3 methods (did you want to debug the generic or the method?), but I think defaulting to debugging of the method would be reasonable. (And I think ? needs to be extended to handle S3 methods too, but that's a different question.)

Duncan Murdoch



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Oct 14 00:14:57 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:21 EST