[Rd] Reorganization of packages in the R distribution

Paul Gilbert pgilbert at bank-banque-canada.ca
Fri Dec 12 16:20:09 MET 2003


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



More information about the R-devel mailing list