[R] Error in pruning hclust object using maptree package
kigiokli at gmail.com
Tue Mar 16 21:02:27 CET 2010
I did read the help. However, I didn't pay enough attention to the data
argument, and it seems it doesn't need to use data argument in the
I also noticed this argument afterwards. Now it works for me as well.
Thanks a lot.
Uwe Ligges wrote:
> On 15.03.2010 16:37, Keith wrote:
>> 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
> Have you read ?clip.clust ??
> It says for argument "data":
> data clustered dataset for hclust application.
> whic means you need to provide "data" as the error message suggests as
> pr <- clip.clust(hc, k=4, data=USArrests)
> works for me.
> Uwe Ligges
>> Does anyone have the idea? My environment is
>> R version 2.10.1 (2009-12-14)
>>  maptree_1.4-6
>> Best regards,
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help