[R] Developing R classes

Gabor Grothendieck ggrothendieck at myway.com
Tue Dec 28 18:17:22 CET 2004



Chambers book, Programming with Data, has a lot about S4.

Note that S4 has more features but S3 is simpler and 
has higher performance so its not all one way.  Also, they
are related so if you learn the simpler S3 first it will
make it easier to learn S4 later.  

I suggest you download and read the source code for
package `zoo' for S3 and package `its' for S4.  Both packages
define irregular time series classes.

Date:   Tue, 28 Dec 2004 13:46:10 -0300 (ART) 
From:   Gilvan Justino <giljustino at yahoo.com.br>
To:   <r-help at stat.math.ethz.ch> 
Subject:   [R] Developing R classes 

 
Hi,

I´m trying to write some R classes but I din´t find documentation enought to develop them. I read there is 2 ways to write classes, using S3 ou S4 models. And it seems that S4 is the best model, so I thing I should use this one. 

I´m new user of R and I´m searched on the net some information about creating new classes. I found this document:
http://www.biostat.harvard.edu/courses/individual/bio271/lectures/L11/S4Objects.pdf
If someone knows some docs about creating our own classes, could please, post its url at here ?

More one question... It seems that some documents about S can be applyed to R. How do you know if you can use this documentation using R ? I´m asking this because some stufs I was looking for I found more explanation using S and not R. Am I right or I´m looking in the wrong place ?

Thanks a lot!




More information about the R-help mailing list