parsec2igraph {parsec} | R Documentation |
Converting a partial order to an object of the package igraph
.
Description
The function turns a cover matrix to an igraph
object, so as to allow using the graphical power of igraph
to plot Hasse diagrams. Objects of class cover
are boolean matrices where element ij is equal to 1 if element i is covered by element j. This makes the cover matrix the transpose of the adjacency matrix of a graph, describing the cover relation in igraph
.
Usage
parsec2igraph(p, ...)
## S3 method for class 'cover'
parsec2igraph(p, ...)
## S3 method for class 'incidence'
parsec2igraph(p, ...)
Arguments
p |
an object of class |
... |
additional arguments of the function |
Value
The function returns an object of class igraph
, representing the directed graph defined by the cover relation.
The function adds to the graph a layout generated through function vertices
, so as to plot the graph according to the conventions used for Hasse diagrams.
Author(s)
Arcagni, A.
References
Csardi G, Nepusz T: The igraph software package for complex network research, InterJournal, Complex Systems 1695. 2006. http://igraph.org
See Also
Examples
example(merge.wprof)
poset <- getzeta(distribution)
incidence2cover(poset)
G <- parsec2igraph(poset, noise = TRUE)
get.adjacency(G)
# tkplot(G, vertex.size = distribution$freq, vertex.color = "white")
G <- parsec2igraph(poset, noise = 10)
# tkplot(G, vertex.size = distribution$freq, vertex.color = "white")