Learn R Programming

relations (version 0.1-0)

plot: Visualize Relations

Description

Visualize certain endorelations by plotting a Hasse Diagram of their transitive reduction.

Usage

## S3 method for class 'relation':
plot(x, attrs = list(edge = list(arrowsize = "0")), ...)

Arguments

x
an Robject inheriting from class relation.
attrs
argument passed to the plot method for class graphNEL.
...
Other arguments passed to the graphNEL plot method.

Details

Visualization is currently only provided for antisymmetric and transitive endorelations, and requires that package Rgraphviz is available.

See Also

relation

Examples

Run this code
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))
}

Run the code above in your browser using DataLab