plot.Rmonad: Render an Rmonad graph

Description Usage Arguments Details Examples

View source: R/generics.R

Description

Convert the Rmonad object to a DiagrammeR graph and then render it

Usage

1
2
## S3 method for class 'Rmonad'
plot(x, y, label = NULL, color = "status", ...)

Arguments

x

An Rmonad object

y

This variable is currently ignored

label

The node labels. If NULL, the node labels will equal node ids. It may be one of the strings ['code', 'time', 'space', 'value', 'depth']. If 'value' is selected, nodes with no value cached are represented with '-'. Alternatively, it may be a function that maps a single Rmonad object to a string.

color

How to color the nodes. Default is 'status', which colors green for passing, orange for warning, and red for error. Alternatively, color can be a function of an Rmonad object, which will be applied to each node.

...

Additional arguments passed to plot.igraph. These arguments may override rmonad plotting defaults and behavior specified by the 'label' and 'color' parameters.

Details

The nodes in the graph represent both a function and the function's output. The edges are relationships between nodes. In an unnested pipeline, every edge represents data flow from source to sink (solid black edges). Nested pipelines contain three additional edge types: a transitive edge, where a node is dependent on a value that was passed to its parent (dotted gray line); a nest edge linking a node to the nested node that produced its value (solid red line); a 'prior' edge for pipelines coupled with the %__% operator (thick dotted blue line).

Examples

1
2
3
4
5
data(gff)
# default plot
plot(gff$good_result)
# turn off vertex labels and set vertex size
plot(gff$good_result, vertex.size=10, vertex.label=NA)

arendsee/rmonad documentation built on Oct. 10, 2018, 6:26 p.m.