Chapter 14 R6

Learning objectives:

  • Discuss how to construct a R6 class.
  • Overview the different mechanisms of a R6 class (e.g. initialization, print, public, private, and active fields and methods).
  • Observe various examples using R6’s mechanisms to create R6 classes, objects, fields, and methods.
  • Observe the consequences of R6’s reference semantics.
  • Review the book’s arguments on the use of R6 over reference classes.