set <- ordered(letters[1:5])
set.seed(0)
n <- 30
x <- data.frame(
A = sample(set, n, replace = TRUE),
B = sample(set, n, replace = TRUE),
C = sample(set, n, replace = TRUE)
)
p <- poset_from_dataframe(x, collapse = ",")
plot(p, equispaced = TRUE, vertex.frame.color = "lightgray", vertex.color = "lightgray")
Run the code above in your browser using DataLab