[R] How to re-order clusters of hclust output?

Emmanuel Levy emmanuel.levy at gmail.com
Fri May 11 21:35:38 CEST 2012


Hi Michael,

Thanks for the info!

I think the key function I was missing is: order.dendrogram and not
REorder.dendrogram. It returns me the new order, so I think I should
get going with that :)

Emmanuel



On 11/05/2012, R. Michael Weylandt <michael.weylandt at gmail.com>
<michael.weylandt at gmail.com> wrote:
> I don't have a general answer to your question, but 1L and 2L are just the
> integers 1 and 2 (the L makes them integers instead of doubles which is
> useful for some things)
>
> Michael
>
> On May 11, 2012, at 2:15 PM, Emmanuel Levy <emmanuel.levy at gmail.com> wrote:
>
>> Hello,
>>
>> The heatmap function conveniently has a "reorder.dendrogram" function
>> so that clusters follow a certain logic.
>>
>> It seems that the hclust function doesn't have such feature. I can use
>> the "reorder" function on the dendrogram obtained from hclust, but
>> this does not modify the hclust object itself.
>>
>> I understand that the answer should be within the "heatmap" function
>> given that it uses hclust to work, but I find it very hard to follow
>> actually. For example I just don;t get what is 1L and 2L.
>>
>> Any help would be appreciated!
>>
>> Thanks,
>>
>> Emmanuel
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list