News for hackers. Stuff that matters.
Re:Advanced R programming by felixr on Sunday November 17, 2013 @09:15AM (#6749006)
I think when it comes to inheritance and object-oriented programming, R and JavaScript share the problem that there is not one standard why of doing it. Libraries can and do implement different systems. In JavaScript prototypal inheritance is built-in, but there are also libraries that implement there own way of doing OO. In R you have the S3, S4 and Reference class system, and their are also packages that implement other approaches.

For prototypal inheritance in R you can try the proto package [1].

[1]: http://cran.r-project.org/web/packages/proto/index.html

Re:Advanced R programming by jnbiche on Sunday November 17, 2013 @10:20AM (#6749248)
Interesting that R has a proto package, but to be honest, if I get to the point where I need classes or prototypal inheritance in R, I reach for another tool. R is excellent for exploratory data analysis, but in my (admittedly limited) experience with R, it makes for a poor choice for anything more complex than a small script.