[R] Hierarchical clustering using own distance matrices

Newbie@R ayesha.2.jadoon at googlemail.com
Tue May 25 23:12:06 CEST 2010


Hey Everyone!

I wanted to carry out Hierarchical clustering using distance matrices i have
calculated ( instead of euclidean distance etc.)

I understand as.dist is the function for this, but the distances in the
dendrogram i got by using the following script(1) were not the distances
defined in my distance matrices. 

script:
var<-read.table("the distance matrix i calculated", header=TRUE, sep=" ")
var_HC<-hclust(as.dist(var),method="average")


var_dendro<-as.dendrogram(var_HC)

plot(var_dendro,ylim=c(0,5), nodePar =list(lab.cex = 0.3), header=title(" My
Distance Matrix"))


I did some research and found that the hclust function (from the hclust help
page):


"...Initially, each object is assigned to its own cluster and then the
algorithm proceeds iteratively, at each stage joining the two most similar
clusters, continuing until there is just a single cluster. At each stage
distances between clusters are recomputed by the Lance–Williams
dissimilarity update formula according to the particular clustering method
being used. ..."


I am wondering is there another function that doesnt do " At each stage
distances between clusters are recomputed by the Lance–Williams
dissimilarity update formula according to the particular clustering method
being used.."???


I hope my message was clear, any help would be greatly appreciated.


Thanks!!

A.Jadoon

Kings College London


-- 
View this message in context: http://r.789695.n4.nabble.com/Hierarchical-clustering-using-own-distance-matrices-tp2230724p2230724.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list