getR6ClassInherits: Compute the class hierarchy for a collection of R6 class...

View source: R/R6ClassHierarchy.R

getR6ClassInheritsR Documentation

Compute the class hierarchy for a collection of R6 class definitions

Description

This function analyzes the R6 class definitions in a package and computes the relationships between them in terms of which classes inherit/extend other classes. This creates a class hierarchy which we can then query and visualize.

Usage

getR6ClassInherits(pkg, ns = getNamespace(pkg))

Arguments

pkg

the name of an R package (without the "package:" prefix.

ns

the namespace for the package

Value

A 2-column data.frame providing the to-from edges for the graph that identifies which class directly inherits from which other class.

Author(s)

Duncan Temple Lang

See Also

mkClassGraph

Examples

g = getR6ClassInherits("rstatic")
if(require(igraph))
   plot(graph_from_data_frame(g), cex.arrow.size = .3)

duncantl/CodeAnalysis documentation built on Feb. 21, 2024, 10:49 p.m.