Package Class Inheritance Report

Class Inheritance Network

This section analyzes the class inheritance relationships for classes defined in r reporter$pkg_name. The following class types are supported:

S3 classes are not supported. For more information about object-oriented programming in R, see the section at the bottom.

reporter$calculate_default_measures()

Visualization

Nodes are classes. Edges point from a child class to its parent class.

if (nrow(reporter$nodes) > 0) {
    reporter$graph_viz
} else {
    "This package has no classes defined."
}

Table

reporter$get_summary_view()

About Classes, Inheritance, and R's Object-Oriented Systems

In object-oriented programming, code is oriented around "objects". "Classes" are definitions of types of objects that share the same attributes and functionality. For more information, see the Wikipedia article.

In the concept of inheritance, children classes are extensions of their parent class in that they—generally speaking—are a superset of their parent class. Children classes "inherit" attributes and functionality from their parent classes. This reporter graphs the inheritance between the classes of a package, with inheritance as a directed edge from a child class to its parent class.

R has four main object-oriented systems: S3, S4, and Reference Classes are part of base R; the R6 package provides another commonly used system.

This reporter supports the S4, Reference Class, and R6 systems. S3 classes are not supported because their inheritance is defined on an ad hoc per-object basis, rather than formally by class definitions.

For more info about R's built-in object-oriented systems, check out the relevant chapter in Hadley Wickham's Advanced R. For more info about R6, check out their documentation website or the chapter in Advanced R's second edition.



Try the pkgnet package in your browser

Any scripts or data that you put into this service are public.

pkgnet documentation built on Dec. 23, 2021, 9:07 a.m.