Hi,

Could someone point me in the right direction for documentation on the following question? 

Let's say I have two objects a and b of classes A and B, respectively.
Now let's say I write a function foo that does something similar to 
objects of type A and B. Basically I want to overload the function
in C++ talk, so if I give foo and object of type A something (and this
is my question) dispatches the call to, say, foo.A, and if I give foo
and object of type B something dispatches the call to, say, foo.B.

I want to write foo.A and foo.B. How to I perform the method 
dispatch? From what I understand there are two ways in R:
S3 and S4. What is the simple S3 way?

Thanks!

Jack.

       
---------------------------------

	[[alternative HTML version deleted]]

