Skip to content
Prev 15887 / 63461 Next

Overloading methods in R

I had to abstract the question in a setntence this time to prevent it to be 
missed again 'in the flurry of messages'.

Gabor Grothendick's example does work for S3 and your own example does work 
for S4 but none of them answer the problem I declared a few times. Both 
examples work fine for an 'specific' case. I am looking for a general 
solution to use it with a parser as part of an automatic  wrapper.

When wrapping some arbitrary C++ classes, we don't know

- how many functions are overloaded in a class
- how many arguments each function has
- what class is each argument of each function

Implementing the wrapper in the way that you and Gabor Grothendick suggest 
requires a lot of 'if' and 'missing' making it too elaborated.

Now if anyone has any elegant solutions for some 'automatic' implementation 
of overloaded methods in R, I am open to suggestions.