[R] text size + text-dendrogram

Romain François francoisromain at free.fr
Sat Nov 6 14:42:36 CET 2004


Helmut Kudrnovsky a écrit :

> dear R-friends,
>
> i performed a cluster analysis (diana in package cluster) with about 
> 300 samples.
>
> two questions:
>
> - if i plot a dendrogram of the analysis, i can´t read the labels of 
> the samples, because the size of the label-text is too big and the 
> label-text of  3 or 4 samples are mixed. so i can´t read which label 
> belongs to which sample. i tried to adjust the text-size with the 
> option cex (a numerical vector giving the amount by which plotting 
> text and symbols should be scaled relative to the default - from the 
> help for plot.default(graphics)), but it didn´t help. the problem 
> exist also, when i export the plot into a meta-file or a 
> postscript-file for further work with the dendrogram in an other 
> application.
>
> - is it possible to export or save the dendrogram from the R-shell in 
> a kind of a text-dendrogramm like:
>
>                                        I
>                               ---------------------
>                               I                    I
>                           ---------            ----------
>                           I        I            I         I
> s...sample          s1     s2         s3      s4
>
from : ?dendrogram

hc <- hclust(dist(USArrests), "ave")
(dend1 <- as.dendrogram(hc)) # "print()" method
str(dend1)          # "str()" method
str(dend1, max = 2) # only the first two sub-levels


The str functions will give a text representation of your tree.

> os: win xp
> R: 2.0.0.
>
> with greetings from the snowy tyrol
> helli
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>
>

-- 
Romain François
25, avenue Guy Moquet
94 400 Vitry sur seine
FRANCE
_______________________
_______________________

francoisromain at free.fr
01 46 80 65 60
06 18 39 14 69




More information about the R-help mailing list