data("Votes")
### create dummy coding (with removed party affiliation)
x <- as.dummy(Votes[-17])
### calculate distance matrix
d <- dists(x, method = "binary")
### use standard method
order <- seriation(d)
order
### use hclust w/complete linkage + optimal leaf ordering
order2 <- seriation(d, method = "Optimal")
order2
### use hclust w/single linkage + optimal leaf ordering
order3 <- seriation(d, method = "Optimal", args = list(method = "single"))
order3
Run the code above in your browser using DataLab