Skip to content
Prev 175884 / 398506 Next

Programming objects in R

Tom Backer Johnsen wrote:
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.

vQ

[1] http://www.burns-stat.com/pages/Tutor/R_inferno.pdf