[R] dendrogram plotting problem

Marcelino de la Cruz marcelino.delacruz at upm.es
Wed May 24 16:02:11 CEST 2006


j.joshua thomas <researchjj <at> gmail.com> writes:

> 
> Dear List
> 
> RGui Version : 2.3.0
> User : 1 month
> 
> I am having the *dendrogram plotting problem *
> 
> The code i tried:
> 
> >library(cluster)
>  DD<-DataSetS01022  # 575 x 2 matrix
> > VC<-hclust(dist(DD),"ave")
> *Warning message:
> NAs introduced by coercion* ( what does it mean? Is that the problem?)
  
> > plot(VC,hang=-2)
> 
> Output: http://roughjade.blogspot.com


I think the problem is ploting too many branches (575) in the same dendrogram.

You may consider reading help(dendrogram) to find alternative ways of 
visualizing such huge amount of data.
I would try something like 

   VCd<-as.dendrogram(VC)
   plot(VCd, nodePar=list(pch = c(NA,NA), cex=0.8, lab.cex = 0.01))

and use a  magnifying glass to se the labels ;)

or better

   VCd2 <- cut(VCd, h=5)
   plot(VCd2$upper) #to visualize the general structure of the dendrogram

and then

   plot(VCd 2$lower[[1]])
   plot(VCd 2$lower[[2]])
   plot(VCd 2$lower[[3]])
   ...
 etc, to visualize every branch.



Marcelino de la Cruz 
Departamento de Biologia Vegetal
Universidad Politecnica de Madrid



More information about the R-help mailing list