[R] font sizes for row.names of dendograms

Sean Davis sdavis2 at mail.nih.gov
Thu Mar 24 12:02:11 CET 2005


On Mar 23, 2005, at 10:42 PM, Brett Stansfield wrote:

> Dear R
> I recently performed a cluster analysis. It produced the dendogram no
> problem but unfortunately the font size of the row.names were all 
> cluttered
> due to their large size
> So I tried to change the font size using
> plclust(cluster.results, labels=iris$specie, cex=0.8)
>
> and R came back to me saying
> Error in plclust(cluster.results, labels = iris$specie, cex = 0.8) :
>         unused argument(s) (cex ...)
>>
> what am I doing wrong here
>

Brett,

If you take a look at the help for hclust, you can see that there are 
two methods for plotting.  The second is plclust and looking at the 
arguments that you can give, there is not one for cex and there are not 
other arguments besides those listed available.  On the other hand, 
there is a "plot" method for hclust objects that includes "..." as an 
argument.  That "..." means take any other arguments and pass them to 
some underlying function--in this case plot.  So, using cex with plot 
rather than plclust will likely give what you want.

Obviously, there are some subtleties to reading R help files, but it is 
definitely worth the extra effort at the beginning to read the help for 
EVERY command that you use, if for no other reason than you are reading 
the help files (but an added bonus, at least for me, is that I often 
discover another feature of a function that saves me time down the 
road).

Sean




More information about the R-help mailing list