powered by
Turns a distance matrix into a data frame of pairwise distances.
mat2df(M)
Data frame with pairwise distances.
a square pairwise matrix (e.g., of distances).
set.seed(42) M <- matrix(rnorm(25), nrow=5) M mat2df(M) M <- matrix(rnorm(25), nrow=5, dimnames=list(letters[1:5], letters[1:5])) M mat2df(M)
Run the code above in your browser using DataLab