Skip to content
Prev 15864 / 63461 Next

Overloading methods in R

Henrik,

Thanks for a reply as the author of the package. I understand that you 
people are interested in discussing this COOP-FOOP fight, however, the 
original question of this thread is all forgotton. So, I declare the 
question again:

-> How to overload methods in classes created by R.oo package? <-

I even sent you this question by the email provided in the package, but 
still no answer!

I am trying to wrap some C++ class into R, so, in the way that you 
described, I am trying to wrap some COOP 'things' by some FOOP 'things'. 
Although there are some packages in R that already wrapped some C++ classes 
into R, none of them kept the originality of the wrapped classes. That is, 
the original C++ classes are customised and dissolved to R functions. There 
is nothing wrong with doing this, but, I am wrapping a few hundered C++ 
classes automatically and apparently it is not possible to customise each of 
them.

The good thing about R.oo is that it is a trouble-less interface between 
COOP and FOOP. In fact, I have already used the package successfully to 
generate S3 classes from C++ *automatically*. The only big issue that I have 
with it is that R.oo overwrites overloaded methods and, to keep the 
originality of the C++ class and bein nice to the end user, I don't want to 
change the name of the overloaded functions. Also there is this point that 
sometime in feature S3 classes will become completely obsolete and new 
packages shouldn't be based on it. So it would be nice to have a 'S4-R.oo'.

Finally, I remind the package author about the original question:

- How to overload methods in classes created by R.oo package?

with one more question that I add it right now:

- Why R.00 is not upgraded to S4?

and I hope we have some 'answer'.


-Ali