plot {relations} | R Documentation |
Visualize certain endorelations by plotting a Hasse Diagram of their transitive reduction.
## S3 method for class 'relation': plot(x, attrs = list(graph = list(rankdir = "BT"), edge = list(arrowsize = "0"), node = list(shape = "rectangle", fixedsize = FALSE)), ...)
x |
an R object inheriting from class relation . |
attrs |
argument passed to the plot method for class
graphNEL . |
... |
Other arguments passed to the
graphNEL plot method. |
Visualization is currently only provided for either antisymmetric or complete transitive endorelations and requires that package Rgraphviz is available. In case of transitive complete relations (preferences), the dual complement is plotted. Note that the default settings create a diagram with nodes ordered bottom-up and with no arrows.
if(require("Rgraphviz")) { ## simple example plot(as.relation(1 : 5)) ## inclusion on a power set: ps <- 2 ^ set("a", "b", "c") inc <- set_outer(ps, set_is_subset) plot(relation(incidence = inc)) }