Hierarchical clustering with own distance matrix

Create your own dissimilarity matrix and save it in a file, say test.matrix

column1 column2 column3
0 1 3
1 0 2
3 2 0
test <- read.matrix("test.matrix",header=TRUE,sep="\t")
h = hclust(as.dist(test))
Print Friendly, PDF & Email

Creative Commons License
This work is licensed under a Creative Commons
Attribution 4.0 International License

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.