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 stansfield
The error message states that you are passing a parameter called cex which has not been used. If you look at ?plclust more closely you will see it does not have cex parameter. However the S3 method for class hclust, plot, does? So does this help? hc <- hclust(dist(USArrests), "ave") plot(hc,cex = 0.5) Tom> -----Original Message----- > From: Brett Stansfield [mailto:brett at hbrc.govt.nz] > Sent: Thursday, 24 March 2005 11:42 AM > To: R help (E-mail) > Subject: [R] font sizes for row.names of dendograms > > > 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 stansfield > > ______________________________________________ > 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 >
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