dist_long | R Documentation |
Turns a dist object from a "wide" to a "long" table
dist_long(d, ...)
d |
a distance object |
... |
not used |
A data.frame with two columns of rows and column names of the dist object and a third column (distance) with the distance between the two.
data(iris)
iris[2:6, -5] %>%
dist() %>%
data.matrix()
iris[2:6, -5] %>%
dist() %>%
as.vector()
iris[2:6, -5] %>%
dist() %>%
dist_long()
# This can later be used to making a network plot based on the distances.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.