[R] S3 vs. S4
MSchwartz at mn.rr.com
Sun Jan 1 21:59:49 CET 2006
On Sun, 2006-01-01 at 13:07 -0600, Erin Hodgess wrote:
> Dear R People:
> Could someone direct me to some documentation on the
> difference between S3 and S4 classes, please?
> For example, why would a person use one as opposed to another?
> Maybe pros and cons of each?
> Thanks in advance!
> R Version 2.2.0 (I'm downloading the new one this afternoon!) Windows.
> Happy New Year!
Some places to start:
1. Fritz Leisch's "S4 Classes and Methods" from the useR! 2004 meeting:
2. Doug Bates' "Converting Packages to S4" in R News 3/1, 2003:
3. Thomas Lumley's "Programmer's Niche: A Simple Class, in S3 and S4"
in R News 4/1, 2004:
Also, if you do a Google search with the following:
that will bring up some discussions (248 hits) in the list archives,
mainly in r-devel, some of which will be relevant to your question.
In addition, you might want to look at:
1. John M. Chambers. Programming with Data. Springer, New York, 1998.
ISBN 0-387-98503-4. AKA "The Green Book"
2. William N. Venables and Brian D. Ripley. S Programming. Springer,
2000. ISBN 0-387-98966-8.
More information about the R-help