Subclasses of class "call" not possible in R.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Subclasses of class "call" not possible in R.

Vitalie S.-2

Hello Everyone!

I am trying to extend the class "call", but keep getting errors whatever I do:

setClass("mycall", contains = "call")
#[1] "mycall"

new("mycall")
#Error in function (object)  :
#  error in evaluating the argument 'object' in selecting a method for function
#'show'

new("mycall", quote(a+b))
#Error in .getClassFromCache(Class, where) :
#  could not find function "<undef>"


I understand this is rarely needed, but for some special reasons I really need
the class "call" (as usually returned by quote and substitute) and not class
"expression".

Would really appreciate any workarounds.

Thanks,
Vitalie.

platform       i386-pc-mingw32                            
arch           i386                                        
os             mingw32                                    
system         i386, mingw32                              
status         Patched                                    
major          2                                          
minor          12.0                                        
year           2010                                        
month          11                                          
day            01                                          
svn rev        53513                                      
language       R                                          
version.string R version 2.12.0 Patched (2010-11-01 r53513)

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel