[R] Dendrogram with the UPGMA method
Marcin Kozak
nyggus at gmail.com
Sat Jan 17 10:14:10 CET 2009
Hi,
I am clustering objects using the agnes() function and the UPGMA
clustering method (function = "average"). Everything works well, but
apparently something is wrong with the dendrogram. For example:
x<-c(102,102.1,112.5,113,100.3,108.2,101.1,104,105.5,106.3)
y<-c(110,111,110.2,112.1,119.5,122.1,102,112,112.5,115)
xy<-cbind(x,y)
library(cluster)
UPGMA.orig<-agnes(x)
plot(UPGMA.orig,which.plots=2,xlab="",main="",sub="")
Look how the dendrogram has been drawn: all the OTUs should line up
with 0.0 on the "distance" axis, but it is not the case in the
dendrogram obtained here. Is it possible to obtain a traditional
dendrogram?
(I am using R 2.7.0 with Windows XP)
Thanks and best wishes,
Marcin
More information about the R-help
mailing list