Re: [R] Customizing Cluster Analysis plots created with hclust

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Fri 02 Jul 2004 - 00:22:34 EST

>>>>> "TomJ" == Joy, Tom <Tom.Joy@rmbinternational.com>
>>>>> on Thu, 1 Jul 2004 11:20:33 +0100 writes:

    TomJ> I am trying to cluster stock prices through time using
    TomJ> hclust.  To help with the interpretation of the output
    TomJ> I would like to change the colour of the lines and the
    TomJ> labels based on which sector a stock is in.  Is it
    TomJ> possible to customize a plot of the output of hclust
    TomJ> in this way?

It will be possible in the next versoin of R, and soon in "R-devel" --
by

 myhcl <- hclust(..........)
 myd <- as.dendrogram(myhcl)

i.e. working with the dendrogram (and its plot method) rather than with the original "hclust" object and its much less flexible plotting method.

Since the needed changes only need R-code changes, you can ask me "off line" and I'll send you the R code needed.

Regards,
Martin



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 02 00:27:15 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:38 EST