InheritanceReporter: Class Inheritance Reporter

InheritanceReporterR Documentation

Class Inheritance Reporter


This reporter takes a package and traces the class inheritance structure. Currently the following object-oriented systems are supported:

  • S4 Classes

  • Reference Classes (sometimes informally called "R5")

  • R6 Classes

S3 classes are not supported, as their inheritance is defined on an ad hoc basis per object and not formally by class definitions.


Note the following details about class naming:

  • Reference Classes : The name passed as Class in setRefClass is used as the node name by this reporter. This is the class name that is used when specifying inheritance. The generator object returned by setRefClass does not have to be assigned and can have a different name.

  • R6 Classes : The name of the generator object in the package namespace is used as the node name by this reporter. The generator object returned by R6::R6Class is what is used when specifying inheritance. The name passed as classname passed to R6::R6Class can be a different name or even NULL.

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 docs website or the chapter in Advanced R's second edition.

Super classes

pkgnet::AbstractPackageReporter -> pkgnet::AbstractGraphReporter -> InheritanceReporter

Active bindings


(character string) path to R Markdown template for this reporter. Read-only.


Public methods

Inherited methods

Method clone()

The objects of this class are cloneable with this method.

InheritanceReporter$clone(deep = FALSE)

Whether to make a deep clone.

See Also

Other Network Reporters: DependencyReporter, FunctionReporter

Other Package Reporters: DependencyReporter, FunctionReporter, SummaryReporter

pkgnet documentation built on June 22, 2024, 12:19 p.m.