dist_long: Turns a dist object to a "long" table

View source: R/dist_long.R

dist_longR Documentation

Turns a dist object to a "long" table

Description

Turns a dist object from a "wide" to a "long" table

Usage

dist_long(d, ...)

Arguments

d

a distance object

...

not used

Value

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.

Examples

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.

dendextend documentation built on Oct. 13, 2024, 1:06 a.m.