[R] cluster by unique value

Alfredo Alessandrini
2011-07-18T10:23:39Z

Hi,

I need to make a cluster classification by the unique values of the data frame.

I explain the problem. I need to classify this table, and assign to
the same cluster each row that has the same combination of value:


> data1
             layer_1 layer_2 layer_3
   [1,] 0.2460000000       2    -0.1
   [2,] 0.5460000000       3    -0.1
   [3,] 0.2460000000       2    -0.1
   [4,] 0.8460000000       2    -0.1
   [5,] 0.2460000000       1    -0.1
   [6,] 0.5460000000       2    -0.1
   [7,] 0.2460000000       2    -0.1
   [8,] 0.8460000000       2    -0.1
   [9,] 0.2460000000       2    -0.1
  [10,] 0.2460000000       2    -0.1


> data1_class
             layer_1 layer_2 layer_3 class
   [1,] 0.2460000000       2    -0.1  1
   [2,] 0.5460000000       3    -0.1  2
   [3,] 0.2460000000       2    -0.1  1
   [4,] 0.8460000000       2    -0.1  3
   [5,] 0.2460000000       1    -0.1  4
   [6,] 0.5460000000       2    -0.1  5
   [7,] 0.5460000000       3    -0.1  2
   [8,] 0.8460000000       2    -0.1  3
   [9,] 0.2460000000       2    -0.1  1
  [10,] 0.8460000000       2    -0.4  6



Thanks in advance,

Alfredo