Convert pairwise list to distance matrix

Share:

Description

Convert pairwise list to distance matrix

Usage

1
list2dist(dat)

Arguments

dat

dataframe with three columns

Details

Dataframe with first column as the column names in the distance matrix, second column as the rownames in the distance matrix, third column the values.

Value

distance matrix

Author(s)

Jinlong Zhang jinlongzhang01@gmail.com

References

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

See Also

dist2list

Examples

1
2
3
4
5
##list2dist() example
x <- matrix(rnorm(100), nrow=5)
sampledata <- dist(x)
ddd <- dist2list(sampledata)
list2dist(ddd)