plotPackageGraph {pkgGraphR}R Documentation

Plot a graph or diagram of a package

Description

From a list of nodes and edges, plots a diagram or graph

Usage

plotPackageGraph(graph, fun.list, use.subgraphs = FALSE, use.colors = FALSE)

Arguments

graph

A list generated by buildPackageGraph containing edges and nodes of the graph.

fun.list

An optional list generated by collectFunNames containing each files function assignments. Used only if 'use.subgraphs' or 'use.colors' are true

use.subgraphs

Logical indicating whether the graph should be partitioned into subgraphs by the file in which the function assignment was made. DEFAULT: FALSE

use.colors

Logical indicating whether the nodes of the graph should be colored by the file in which the function assignment was made. N.B. No legend is plotted for the colors. DEFAULT: FALSE

Value

A grviz plot.

See Also

collectFunNames, buildPackageGraph

Examples

pkgGraph <- system.file("extdata", package = "pkgGraphR") |> 
    buildPackageGraph()
plotPackageGraph(graph = pkgGraph)

pkgFuns <- system.file("extdata", package = "pkgGraphR") |> 
    collectFunNames()

plotPackageGraph(graph = pkgGraph, fun.list = pkgFuns, use.subgraphs = TRUE)
plotPackageGraph(graph = pkgGraph, fun.list = pkgFuns, use.colors = TRUE)
plotPackageGraph(graph = pkgGraph, fun.list = pkgFuns, use.colors = TRUE, use.subgraphs = TRUE)


[Package pkgGraphR version 0.2.0 Index]