distance2df | R Documentation |
This function converts a distance matrix into a data frame with three columns: from, to, count. The rows and columns of the matrix are all unique names from the 'from' and 'to' columns,
distance2df(distance_matrix)
distance_matrix |
A distance matrix where rows and columns are all unique names from 'from' and 'to' columns. |
A data frame containing three columns: from, to, count.
distance_matrix <- matrix(c(0, 1, 2, 3, 4, 5, 6, 7, 8), nrow = 3)
distance2df(distance_matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.