| Type: | Package |
| Title: | Drawing Hasse Diagram |
| Version: | 0.2.0 |
| Date: | 2021-06-10 |
| Author: | Krzysztof Ciomek |
| Maintainer: | Krzysztof Ciomek <k.ciomek@gmail.com> |
| URL: | https://github.com/kciomek/hasseDiagram |
| Depends: | Rgraphviz (≥ 2.6.0), grid (≥ 3.0.2), graph |
| Imports: | methods |
| Description: | Drawing Hasse diagram - visualization of transitive reduction of a finite partially ordered set. |
| License: | MIT + file LICENSE |
| RoxygenNote: | 7.1.1 |
| NeedsCompilation: | no |
| Packaged: | 2021-06-10 05:57:31 UTC; Krzysztof |
| Repository: | CRAN |
| Date/Publication: | 2021-06-10 06:10:02 UTC |
Drawing Hasse Diagram
Description
Drawing Hasse diagram - visualization of transitive reduction of a finite partially ordered set.
Details
| Package: | hasseDiagram |
| Type: | Package |
| Version: | 0.2.0 |
| Date: | 2021-06-10 |
| License: | MIT |
Author(s)
Krzysztof Ciomek
Maintainer: Krzysztof Ciomek <k.ciomek@gmail.com>
See Also
Generate random data for hasse function
Description
This function generates random data for hasse function.
Usage
generateRandomData(nrNodes, minGraphs = 1, density = 0.5)
Arguments
nrNodes |
Numer of nodes ( |
minGraphs |
Minimal number of graphs to generate ( |
density |
Value which determines number of edges and shape of graphs ( |
Value
nrNodes x nrNodes matrix.
Examples
data0_0 <- generateRandomData(15, 2, 0.0)
data0_5 <- generateRandomData(15, 2, 0.5)
data1_0 <- generateRandomData(15, 2, 1.0)
hasse(data0_0)
hasse(data0_5)
hasse(data1_0)
Draw Hasse diagram
Description
This function draws Hasse diagram – visualization of transitive reduction of a finite partially ordered set.
Usage
hasse(data, labels = c(), parameters = list())
Arguments
data |
n x n matrix, which represents partial order of n
elements in set. Each cell |
labels |
Vector containing labels of elements. If missing or |
parameters |
List with named elements:
|
Examples
randomData <- generateRandomData(15, 2, 0.5)
hasse(randomData)
# Clustering example
data <- matrix(data = FALSE, ncol = 4, nrow = 4)
data[1, 2] = data[1, 3] = data[2, 4] = data[3, 4] = TRUE
data[2, 3] = data[3, 2] = TRUE
hasse(data, c(), list(cluster = TRUE))
hasse(data, c(), list(cluster = FALSE))
# Hasse to pdf example
# randomData <- generateRandomData(15, 2, 0.5)
# pdf("path-for-diagram.pdf")
# hasse(randomData, NULL, list(newpage = FALSE))
# dev.off()