Hello,
this may prove very basic, but I couldn't find a solution by myself. Any help will be more than appreciated.

Suppose I have the following dataframe:
Code: 
             Dim 1        Dim 2         Dim 3
none   -0.39330845  0.030492071 -0.0008904827
light   0.09945592 -0.141064289  0.0219980349
medium  0.19632096 -0.007359109 -0.0256590867
heavy   0.29377599  0.197765656  0.0262108499
SM     -0.06576838  0.193737004  0.0709810284
JM      0.25895842  0.243304575 -0.0337051897
SE     -0.38059489  0.010659907 -0.0051557575
JE      0.23295191 -0.057743908  0.0033053709
SC     -0.20108912 -0.078911231 -0.0080810762
#CODE to get the above data#
Code: 
dataframe <- structure(c(-0.393308448578719, 0.0994559207933769, 0.19632095639529, 
0.293775985243675, -0.0657683838802591, 0.258958421430402, -0.380594887050213, 
0.232951908222718, -0.201089121884109, 0.0304920711091874, -0.14106428920015, 
-0.00735910858674761, 0.197765656348986, 0.19373700362161, 0.243304574901462, 
0.0106599072048895, -0.0577439077532158, -0.0789112309292166, 
-0.000890482686108689, 0.0219980349296485, -0.0256590866951079, 
0.026210849884605, 0.070981028412564, -0.0337051897371831, -0.00515575749725041, 
0.00330537091909934, -0.00808107623159503), .Dim = c(9L, 3L), .Dimnames = list(
    c("none", "light", "medium", "heavy", "SM", "JM", "SE", "JE", 
    "SC"), c("Dim 1", "Dim 2", "Dim 3")))
and further suppose I got this cluster membership data got from the cutree() function:
Code: 
none  light medium  heavy     SM     JM     SE     JE     SC 
     1      2      2      3      3      3      1      2      1 
Levels: 1 2 3
#CODE to get the above data#
Code: 
members <- structure(c(1L, 2L, 2L, 3L, 3L, 3L, 1L, 2L, 1L), .Names = c("none", 
"light", "medium", "heavy", "SM", "JM", "SE", "JE", "SC"))
How can I copy the cluster membership to a fourth new column of the above dataframe ?


Thank you
Best
Gm