# NOT RUN {
diag1 <- matrix(c(1,1,1,0,2,3,2,2.5,4), ncol = 3, byrow = FALSE)
diag2 <- matrix(c(1,1,0,1,1,2), ncol = 3, byrow = FALSE)
wasserstein.distance(diag1, diag2, dimension = 1, q = 1, p = 2)
# }
Run the code above in your browser using DataLab