set<-c("a", "b", "c", "d")
rel <- matrix(c(
"a", "b",
"c", "b",
"d", "a",
"c", "a",
"d", "b",
"a", "a",
"b", "b",
"c", "c",
"d", "d"
), ncol = 2, byrow = TRUE)
chk <- IsPartialOrder(set, rel)
Run the code above in your browser using DataLab