diagram: Plot the Hasse Diagram of a set of ordered relations

Description Usage Arguments Details Value Warning Note Author(s) See Also Examples

View source: R/diagram.R

Description

A function to plot the Hasse Diagram of partially ordered relations.

Usage

1
2
diagram(x, unord = TRUE, attrs = NULL, main = NULL, cex.main = graphics::par()$cex.main, 
        bg = graphics::par()$bg, ...)

Arguments

x

a matrix representing ordered relations

unord

(logical) whether or not the elements not belonging in the order should be included in the diagram

attrs

(optional) attributes of the diagram

main

(optional) title of the diagram

cex.main

(optional) size of the diagram's title

bg

(optional) the background color of the diagram

...

(optional) other graphical items

Details

An example of ordered relations is found in the partial order table of relations, which is product of the 'strings' option in the partial.order function. Another set of ordered relations comes from the table produced on Galois derivations in the mentioned function.

In either case this function plot either the partial order or a linear order diagram, depending on the results as Hasse diagrams.

Value

A Hasse diagram of the partial order relation.

Warning

This function requires that the Rgraphviz package is available.

Note

Note that if the elements of the partial order are not labelled, Roman numerals will be given to each element.

Author(s)

Antonio Rivero Ostoic

See Also

partial.order, as.strings, strings, diagram.levels, galois.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## load the data
data("incubA")

## given e.g. a partial order table in the object 'po'
po <- partial.order(as.strings(incubA$IM), type="strings")


## plot the order relation as a Hasse diagram.
## Not run: if(require(Rgraphviz)) {
plot(diagram(po))
}
## End(Not run)

multiplex documentation built on May 19, 2017, 6:57 p.m.

Search within the multiplex package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.