[R] Error in pruning hclust object using maptree package
Keith
kigiokli at gmail.com
Mon Mar 15 16:37:54 CET 2010
Dear R users,
Due to too many children in my clustering result, I would like to prune
the tree-like hclust object into a certain groups. However, an error:
> clip.clust: no data provided for hclust object
always shows up.
Firstly, I tried the example in the maptree package, and it worked well.
Then, I tried to used the example in stats package to generate a hclust
object and tried the clip.clust method again, and the error still
occurred. Here is the example:
> hc <- hclust(dist(USArrests), "ave")
> pr <- clip.clust(hc, k=4)
Error in clip.clust(hc, k = 4) :
clip.clust: no data provided for hclust object
Does anyone have the idea? My environment is
R version 2.10.1 (2009-12-14)
x86_64-pc-linux-gnu
[1] maptree_1.4-6
Best regards,
Keith
More information about the R-help
mailing list