Re: [R] help with oop in R - class structure and syntex

From: Luke Tierney <luke_at_stat.uiowa.edu>
Date: Tue, 5 Feb 2008 10:34:13 -0600 (CST)

On Tue, 5 Feb 2008, Barry Rowlingson wrote:

> Duncan Murdoch wrote:
>
>> Another problem is that there are two different class systems in R:
>> sometimes calls S3 and S4 (because of the versions of S where they were
>> introduced). You were reading about S3.
>
> There's three different class systems if you also include the R.oo
> add-on package[1]. Even perl, the language seemingly founded on the
> concept of TMTOWTDI[2], only has the one OOP system.
>
You need to be a bit careful here. R has two object systems, S3, and S4, that are supported in the R internals to allow methods for things like `+` to be written. In addition, R is rich enough as a language to allow users to develop their own object systems if they choose. The fact that there are two internally supported systems is not ideal. On the other, the fact that users can write their own and have done so is a feature.

luke

> Barry
>
> [1] http://www1.maths.lth.se/help/R/R.oo/
> [2] There's More Than One Way To Do It
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke_at_stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 05 Feb 2008 - 16:36:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Feb 2008 - 17:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive