| poset | R Documentation |
Function poset creates a poset from a dominance list. x argument is a two-column matrix, each row defines a pair of comparable elements, where the element in the first column is dominated by or coincide with the element in the second column. If the elements of x are numeric, they are first coerced to character and used as elements labels.
poset(x = NULL, elements = unique(as.character(x)))
x |
an object of class |
elements |
a vector of characters listing all the labels of the elements. |
A partial order relation is reflexive, transitive and anti-symmetric. Given the dominance list provided by the user, the function produces the smallest poset comprising them (reflexive and transitive closure); in case the dominances provided by the user imply non-trivial cicles, violating anti-simmetry, the function returns an error.
By default elements is equal to all the different labels available in x.
If some elements are incomparable, list all of the elements in elements or include self-comparabilities in x. Notice that antichains can be created in a simpler way, by function
antiChain.
an environment of class poset; this class contains a pointer with different C++ methods used by other functions of the package.
in the package are available functions that simply the creation of particular posets: antiChain to create a poset without comparabilities,
chain to create a complete order,
poset_from_dataframe to create a poset from a statistical population.
dom <- matrix(c(
"a", "b",
"c", "b",
"b", "d"
), ncol = 2, byrow = TRUE)
poset(x = dom)
poset(x = dom, elements = letters[1:5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.