Learn R Programming

multiplex (version 1.0)

diagram: Plot the Hasse Diagram of ordered relations

Description

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

Usage

diagram(x, unord = TRUE, attrs = NULL, main = NULL, 
        cex.main = par()$cex.main)

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) diagram's title
cex.main
(optional) diagram's title size

Value

  • A Hasse diagram of the partial order relation.

Details

An example of ordered relations is found in the partial order table of relations, which is product of the partial.order function. This function plot either the partial order or a linear order diagram, depending on the results as Hasse diagrams. Note that if the elements of the partial order are not labelled, Roman numerals will be given to each element.

See Also

partial.order, as.strings, strings.

Examples

Run this code
## load the data
data("incubA")

## given e.g. a partial order table in the object 'po'
po <- partial.order(as.strings(incubA))


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

Run the code above in your browser using DataLab