Learn R Programming

POSetR (version 1.1.4)

poset_from_incidence: Generates a Partially Ordered SET from an incidence matrix

Description

This function generates a poset from an incidence matrix x. Such matrix is a named and logical that is TRUE if the row element is dominated by the column one, FALSE otherwise. Such incidence relation should be reflexive, anti-symmetric, and transitive..

Usage

poset_from_incidence(x)

Value

an environment of class poset.

Arguments

x

a logical matrix.

References

davey2002introductionPOSetR

See Also

poset.

Examples

Run this code
x <- c(
  TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
  TRUE,  TRUE, FALSE, FALSE, FALSE, FALSE,
  TRUE,  TRUE,  TRUE, FALSE, FALSE, FALSE,
  TRUE, FALSE, FALSE,  TRUE, FALSE, FALSE,
  TRUE,  TRUE, FALSE,  TRUE,  TRUE, FALSE,
  TRUE,  TRUE,  TRUE,  TRUE,  TRUE,  TRUE
)
x <- matrix(x, nrow = 6, ncol = 6)
rownames(x) <- colnames(x) <- LETTERS[1:6]
p <- poset_from_incidence(x)
plot(p)

Run the code above in your browser using DataLab