rgp (version 0.4-1)

funcToIgraph: Visualization of functions and expressions as trees

Description

The following functions plot R expressions and functions as trees. The igraph package is required for most of these functions. exprToGraph transforms an R expression into a graph given as a character vector of vertices V and a even-sized numeric vector of edges E. Two elements i and i+1 in E encode a directed edge from V[i] to V[i+1]. funcToIgraph and exprToIgraph return an igraph graph object for an R function or an R expression.

Usage

funcToIgraph(func)
exprToIgraph(expr)
exprToGraph(expr)

Arguments

func
An R function.
expr
An R expression.

Value

The result (see the details section).

See Also

funcToPlotmathExpr