Skip to content
Prev 15844 / 63461 Next

Overloading methods in R

R.oo tries to implement an old-fashioned OO system as found in Java,
Python, C++, etc.  R's S4 methods implement a nice modern system based
on the generic function approach , dispatch on argument signatures,
which is different.

While the R documentation for S4 classes is quite useful (spanning the
green book, the BioC developer help pages,  V&R's book on programming,
and some other papers), I've found that for a nice background, Paul
Graham's ANSI Lisp book, and in particular the nicely written chapter
on CLOS, provides a nice introduction to the thought process.

With respect to the R.oo package, the author might be the best source for that.

Another package which you might take a look at is the proto package,
which provides prototype object-orientation similar to that found in
XLispStat, and also might help with what you are trying to do. 
However, I suspect that learning about the S4 system will provide more
benefit in the future.

best,
-tony
On 4/20/05, Ali - <saveez@hotmail.com> wrote: