[R] plotting dendrograms from cluster analyses

Friedrich Leisch Friedrich.Leisch at ci.tuwien.ac.at
Tue Aug 28 13:20:32 CEST 2001


>>>>> On Tue, 28 Aug 2001 13:02:57 +0200,
>>>>> Philippe Grosjean (PG) wrote:

  >> In university I learned S-Plus, which has a special function exactly for
  >> this problem called subtree, where you can plot a region of a whole tree.
  >> Now in R I missed that function several times. Is there a reason for not
  >> including it in R?

The only reason is that nobody has written it so far ...


  >> Thomas

  > Exact. I've looked in Splus and found the nice subtree command. In R v.
  > 1.3.0 and all packages installed, I've found only snip.rpart for rpart
  > trees. Thus it seems a subtree function should be a good addition to R. I am
  > doing a package in which this could be added (for a very preliminary
  > version, in French, look at http://www.sciviews.org/_passtec), though it is
  > not a top priority for me now. If someone else want to do it, just notify
  > me... otherwise, I'll do it in a few months.


I started a more general approch for dendrograms a year ago using
class "dendrogram". If you coerce an hclust object to class dendrogram
using as.dendrogram() then you can use cut.dendrogram to do what you
want (it returns a list with the upper and lower parts of the cutted
tree).

Unfortunately this is unfinished yet, especially the plotting method
does not print the labels, hence I didn't mention it earlier in this
thread. I plan to finish this for R 1.4 (to be released by the end of
the year), but don't hold your breath.

Of course (as always) volunteers are more than welcome!

See example(cut.dendrogram)

Best,

-- 
-------------------------------------------------------------------
                        Friedrich  Leisch 
Institut für Statistik                     Tel: (+43 1) 58801 10715
Technische Universität Wien                Fax: (+43 1) 58801 10798
Wiedner Hauptstraße 8-10/1071      Friedrich.Leisch at ci.tuwien.ac.at
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
-------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list