Advanced Object-oriented Programming In R: Stat... -
Encapsulation (private vs. public fields); reference semantics (modify objects in-place); method chaining.
S4 is a more formal version of S3, requiring explicit class definitions with "slots" and typed data. Advanced Object-Oriented Programming in R: Stat...
Reference Classes are built into base R and function similarly to R6 but are built on top of S4. Encapsulation (private vs
R6 (via the R6 package ) provides "classical" OOP similar to Java or C++. Encapsulation (private vs. public fields)