Learn R Programming

spaa (version 0.2.2)

dist2list: Convert distance matrix to pairwised list

Description

Convert distance matrix to pairwised list

Usage

dist2list(dist)

Arguments

dist
distance matrix

Value

Dataframe with three columns.

Details

Pairwise list with first column indicates the rows of the original distance matrix, second column indicates the columns indicates the rows of the original distance matrix, and the third indicats the values.

References

Tuomisto, H. (2003). "Dispersal, Environment, and Floristic Variation of Western Amazonian Forests." Science 299(5604): 241-244.

See Also

list2dist

Examples

Run this code

##dist2list() example
x <- matrix(rnorm(100), nrow=5)
sampledata <- dist(x)
ddd <- dist2list(sampledata)

Run the code above in your browser using DataLab