[Rd] rect.hclust fails when k is specified (PR#6740)

Liaw, Andy andy_liaw at merck.com
Mon Apr 5 15:03:15 CEST 2004


I don't think that's a bug.  As ?rect.hclust says, it adds a rectangle to
the dendrogram, which means you need to plot the dendrogram _first_.  See
the example code in the help file.

Andy

> From: ivan_yegorov at mail.ru
> 
> Full_Name: Ivan Egorov
> Version: 1.8.1
> OS: MS Windows 2000, SP4
> Submission from: (NULL) (194.186.91.129)
> 
> 
> V<-t(matrix(scan('C:/V3.dat'),3))
> d<-dist(V)
> hc<-hclust(d)
> rect.hclust(hc,5)
> 
> Error message is displayed:
> 
> Read 24 items
> Error in rect(m[which[n]] + 0.66, par("usr")[3], m[which[n] + 
> 1] + 0.33,  : 
>         plot.new has not been called yet
> 
> Here's my data file ('C:/V3.dat')
> 
> -1	-73	12
> -70	-26	-8
> -78	-101	-35
> -38	-24	-16
> 39	-54	3
> -40	-13	-19
> -45	-9	-19
> -18	-22	2
> 
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
>



More information about the R-devel mailing list