[R] Oriented object programming

Gabor Grothendieck ggrothendieck at gmail.com
Sun Dec 9 19:13:54 CET 2007


On Dec 9, 2007 12:21 PM, Christophe Genolini <cgenolin at u-paris10.fr> wrote:
> Hi all
>
> Two questions:
>  - I would like to learn more on oriented object programming with R. Is
> there any tutorial for that?
> -  Without waking up a troll, I am not very familiar with diffusion
> list, I am more use to forum. On a diffusion list, how can I check if
> someone already asks a question? I mean, I went on CRAN-R website, I
> find the R mailing list archive. But is there a way to search some key
> word like "object programming"?
>

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.



More information about the R-help mailing list