From pgilbert at bank-banque-canada.ca  Fri Dec 12 16:20:09 2003
From: pgilbert at bank-banque-canada.ca (Paul Gilbert)
Date: Fri Dec 12 16:19:51 2003
Subject: [Rd] Reorganization of packages in the R distribution
In-Reply-To: <Pine.LNX.4.44.0312121503140.13907-100000@gannet.stats>
References: <Pine.LNX.4.44.0312121503140.13907-100000@gannet.stats>
Message-ID: <3FD9DCA9.5020105@bankofcanada.ca>

Prof Brian Ripley wrote:

>On Fri, 12 Dec 2003, Paul Gilbert wrote:
>
>  
>
>>Prof Brian Ripley wrote:
>>
>>    
>>
>>>There are a small number of CRAN packages that attempt to modify system
>>>functions and so will need updating.  (Known examples are in dse:tframe,
>>>gregmisc and mclust and some testing code elsewhere.)
>>>
>>>      
>>>
>>Brian
>>
>>What do you mean by "updating?"  In tframe I modify a few functions like
>>
>>     start <- function (x, ...) if (is.Ttframed(x)) start(tframe(x), 
>>...) else UseMethod("start")
>>
>>If that can no longer be done then this is a serious fundamental change 
>>that breaks all my code. I hope that is not what you mean. I'm just 
>>going away for a week, but will follow up when I return.
>>    
>>
>
>It's always been incorrect code, and it no longer works.  You should not
>be masking system generics, as the namespace registration mechanism does
>not work on your version.
>  
>
So what would be the proper mechanism for doing something like this?  
Basically I need to do something that I believe is like multiple 
inheritance. I need to dispatch on the class of a certain part of an 
object rather than on the object itself.  (BTW, this code has worked for 
about  ten years and  I believe predates your definition of  "corrrect".)

Paul


[Rd] Reorganization of packages in the R distribution
Paul Gilbert