1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dist_long.R
\name{dist_long}
\alias{dist_long}
\title{Turns a dist object to a "long" table}
\usage{
dist_long(d, ...)
}
\arguments{
\item{d}{a distance object}
\item{...}{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.
}
\description{
Turns a dist object from a "wide" to a "long" table
}
\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.
}
|