[R] Programming objects in R

Tom Backer Johnsen backer at psych.uib.no
Thu Apr 2 15:54:50 CEST 2009


Wacek Kusnierczyk wrote:
> Tom Backer Johnsen wrote:
>> This is interesting.  The fact that there are so few texts on the
>> subject probably means that very few are using OO programming methods
>> in R.
>>
>> I will probably look in the Python direction.  Pity.  I would have
>> preferred R.
>>
> 
> if you insist on oo, python might be a better choice.  r has two
> built-in oo systems plus a few additional ones in various packages. 
> 
> of the two basic ones, s3 is simple to use though some features may
> confuse you;  in his The R Inferno [1], Pat Burns calls this system 'a
> bit ad hoc'.
> 
> the other, s4, is much more complex, probably too complex for its own
> developers.  additionally, s3 and s4 intefere with each other in ugly
> ways, as some recent posts show.  here's one opinion:
> 
>     library(fortunes)
>     fortune('handcuff')
> 
> if you really have to stay with r, R.oo, for example, might be an
> alternative.
> 
> you can always access r from within python when statistic computations
> are needed, while staying in the cosy realm of a much more coherent
> programming language.

Very true.  Sounds like sensible advice.

Tom
> 
> vQ
> 
> [1] http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
> 
> 
>> Tom
>>
>> krzysztof.sakrejda at gmail.com wrote:
>>> I have been using Chambers for the same purpose but I think he
>>> focuses too much on discussion and too little on technique.  The book
>>> is frustrating to use and I often have to dig to find simple usage
>>> cases. .  Unfortunately there seems to be no other book which
>>> contains the same info.  I've been hoping O'Reilly puts out an R
>>> programming book but nothing yet.
>>>
>>> Best,
>>>
>>> Krzysztof
>>>
>>>
>>> Sent via BlackBerry by AT&T
>>>
>>> -----Original Message-----
>>> From: Tom Backer Johnsen <backer at psych.uib.no>
>>>
>>> Date: Tue, 31 Mar 2009 12:31:17 To: <r-help at r-project.org>
>>> Subject: [R] Programming objects in R
>>>
>>>
>>> I am planning a project where an object-oriented approach would be
>>> appropriate, and for a number of reasons I would prefer using either
>>> Python or R.  My problem at the moment is to find out how to do OO
>>> programming in R.  Are there any introductory texts anywhere ?
>>>
>>> Tom
> 


-- 
+----------------------------------------------------------------+
| Tom Backer Johnsen, Psychometrics Unit,  Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen,  NORWAY |
| Tel : +47-5558-9185                        Fax : +47-5558-9879 |
| Email : backer at psych.uib.no    URL : http://www.galton.uib.no/ |
+----------------------------------------------------------------+




More information about the R-help mailing list