ucecgxu@ucl.ac.uk
2006-Jan-18 21:47 UTC
[R] r-help, how can i use my own distance matrix without using dist()
Dear R-helpers, i am a beginner of R and i am using cluster package to do hierarchical clustering i am wondering if i can use my own distance matrix to do the hierarchical clustering without using dist() function. if i have my own distance matrix, how can i ask hclust() function to recongnize it( as the output of dist() function). thank you very much and i looking forward to hearing from you. Marshall
Marco Geraci
2006-Jan-18 22:38 UTC
[R] r-help, how can i use my own distance matrix without using dist()
see ?dist there's an example x <- matrix(rnorm(100), nrow=5) m <- as.matrix(dist(x)) d <- as.dist(m) 'as.dist' is what you're probably looking for regards, Marco ucecgxu@ucl.ac.uk wrote: Dear R-helpers, i am a beginner of R and i am using cluster package to do hierarchical clustering i am wondering if i can use my own distance matrix to do the hierarchical clustering without using dist() function. if i have my own distance matrix, how can i ask hclust() function to recongnize it( as the output of dist() function). thank you very much and i looking forward to hearing from you. Marshall ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html --------------------------------- Photo Books. You design it and we’ll bind it! [[alternative HTML version deleted]]
Apparently Analagous Threads
- r-help, how can i use my own distance matrix without usin g dist()
- Hierarchical clustering using own distance matrices
- Clustering with R - efficient processing of large sparse data sets (text data)
- Advice on exploration of sub-clusters in hierarchical dendrogram
- Clustering Large Applications..sort of