# NOT RUN {
require(PairViz)
rdist <- function(n) {
d <- matrix(0,n,n)
d[lower.tri(d)] <- runif(n*(n-1)/2)
return(as.dist(d))
}
r <- rdist(7)
best_orientation(1:7,r)
best_orientation(1:7,r,cycle=TRUE)
# }
Run the code above in your browser using DataCamp Workspace