[R] Developing R classes

David Kane dave at kanecap.com
Wed Dec 29 15:06:37 CET 2004

Gilvan Justino writes:
 > Hi,
 > I´m trying to write some R classes but I din´t find documentation
 > enought to develop them. 

I have faced a similar problem. Here is the summary of what I have
been able to find (including some of the responses that you have
already received) with a focus on S4 classes since some people assert
that all new development should be done with them.

1) I think that the three best free resources for learning about S4
classes are (in the order that I recommend you read them):

http://www.omegahat.org/RSMethods/Intro.pdf (More or less Section 1.6
from The Green Book.)

http://www.stat.auckland.ac.nz/S-Workshop/Gentleman/S4Objects.pdf (I
think that this version of the talk is more up-to-date than the one
located at the Bioconductor site at

  author       = {Thomas Lumley},
  title	       = {Programmers' Niche: A Simple Class, in {S3} and {S4}},
  journal      = {R News},
  year	       = 2004,
  volume       = 4,
  number       = 1,
  pages	       = {33--36},
  month	       = {June},
  url	       = {http://CRAN.R-project.org/doc/Rnews/},

2) If you want to get serious with S4 classes, you may need to
purchase "Programming with Data" by John Chambers (aka The Green Book)
and/or "S Programming" by Venable and Ripley. I own both, but am
interested in finding material that is similarly comprehensive but
free. Many of the people (read: students) that I urge to use R do not
have the sort of budgets for buying books that I am lucky enough to

3) I found all of these references to be worth a read through. 


Hope that helps,

Dave Kane

PS. I can't access the stat.auckland site right now but have been able
to in the past.

More information about the R-help mailing list