[R] R: I would appreciate some help with clustering

Stavros Macrakis macrakis at alum.mit.edu
Tue Dec 30 19:22:47 CET 2008

On Tue, Dec 30, 2008 at 8:44 AM,  <mauede at alice.it> wrote:
> It is no homework. It is part of a project where a binary matrix, whose 1s represent the position of the highest DWT coefficients energy, is used as a template to extract signal features.
> The approach I am following requires each row of the binary matrix (correspondent to a DWT scale level) to be clustered separately subject to the requirements of generating as many clusters as the numbers of 1s and having the 1s a the centers of the respective clusters.

Perhaps look into the rle (run-length encoding) function?  It may be
useful to you directly, or the methods it uses internally may be


PS The word 'cluster' may be confusing in some contexts.  Perhaps it
would be better to call them 'runs'.

More information about the R-help mailing list