December 2017
Beginner to intermediate
470 pages
12h 29m
English
S3 and S4 are really just ways to implement polymorphism for static functions. The R6 package provides a type of class which is similar to R's Reference Classes, but it is more efficient and doesn't depend on S4 classes and the methods package as RCs do.
When RCs were introduced, some users, following the names of R's existing class systems S3 and S4, called the new class system R5. Although RCs are not actually called R5 nowadays, the name of this package and its classes follows that pattern.
Despite being first released over three years ago, R6 isn't widely known. However, it is widely used. For example, it's used within Shiny (the focus of the last chapter in this book) and to manage database connections in the dplyr ...