Skip to content
Prev 131663 / 398506 Next

Oriented object programming

On Dec 9, 2007 12:21 PM, Christophe Genolini <cgenolin at u-paris10.fr> wrote:
There are two OO models in R called S3 and S4.  S3 is
inspired by the Dylan language and knowing it is essential to using R.
The manuals and possibly some of the contributed documentation (google
for CRAN contributed documentation) will have info on those although I am
not sure whether it will be sufficient.

The CRAN package zoo uses S3 and the CRAN package its uses S4 and they
have roughly
the same purpose so you can use them as examples by downloading their source.
http://cran.r-project.org/src/contrib/Descriptions/zoo.html
http://cran.r-project.org/src/contrib/Descriptions/its.html

There are also two addon packages that support different OO models.  The proto
package supports the prototype model (also known as the object-based model)
and is inspired by the Self programming language.  The R.oo package supports
a more conventional model similar to that in most other mainstream languages.
The home pages of these two packages are given in their CRAN descriptions:
http://cran.r-project.org/src/contrib/Descriptions/R.oo.html
http://cran.r-project.org/src/contrib/Descriptions/proto.html

You can use the RSiteSearch function from within R to search the
r-help archives and documentation.
or you can browse r-help and r-devel archives here or via gmane or nabble
https://stat.ethz.ch/pipermail/r-help
https://stat.ethz.ch/pipermail/r-devel
Googling with r-help, r-devel or r-project.org or even just R as one
of the words will often
locate material.