Re: [Rd] S4 helper functions: regular or generic?

2009-03-03 Thread Gopi Goswami
Dear Martin, Thanks a lot for your help, apologies for this very late reply. I decided to go with your suggestion, write a regular function. I guess this avoids doing obj - as(foo(as(obj, 'Base')), 'Derived') and then repopulating the extra slots of of the 'Derived' class. Regards, gopi.

[Rd] S4 helper functions: regular or generic?

2009-02-25 Thread Gopi Goswami
Hi there, I want to write helper functions for a base class, which will be used by its subclasses in the S4 world. This function ___will___ update certain slots of its argument object. Please help me decide which one of the following is a better approach with respect to coding style, memory

Re: [Rd] S4 helper functions: regular or generic?

2009-02-25 Thread Martin Morgan
Hi Gopi -- Gopi Goswami grgosw...@gmail.com writes: Hi there, I want to write helper functions for a base class, which will be used by its subclasses in the S4 world. This function ___will___ update certain slots of its argument object. Please help me decide which one of the following is