Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

The S3 object model

As you may recall, the R language is derived from the S language. S's object model evolved over time, and its third version introduced class attributes, which allowed for the S3 object model we find in R today. It is still the object model in R, and most of R's own built-in classes are of the S3 type. It's a valid and very flexible object model, but it's very different from what people who come from other object-oriented languages are used to.

S3 is the least formal object model, so it's lacking in some key respects. For example, S3 does not offer formal class definitions, which implies that there's no formal concept of inheritance or encapsulation, and polymorphism is achieved through generics. It's clear that its functionality ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content