Learn what object-oriented programming (OOP) consists of, when to use it, and what OOP systems are available in R. You'll also learn how R identifies different types of variable, using classes, types, and modes.
S3 is a very simple object-oriented system that lets you define different behavior for functions, depending upon their input argument. This chapter explains how to use S3, and how generics and methods work.
Learn how to define R6 classes, and to create R6 objects. You'll also learn about the structure of R6 classes, and how to separate the user interface from the implementation details.
Learn how to inherit from an R6 class, and how the relationship between parent and child classes works.
Complete your mastery of R6 by learning about advanced topics such as copying by reference, shared fields, cloning objects, and finalizing objects.