Hi Listers,

I am trying to transform the data.frame above in a more detailed data.frame... I checked a example at the website, but I didn't understand at all.
                    
data.frame(x = with(df1, rep(x, m)))
What does the df1 means...

My data looks like this...
    Y  m   X1    X2
  1   3   3 12.0   0.8
  2   1   4   4.1  67.5
  3   1   3  2.4   12.4
  4   2   2 11.2    7.7

My object is to obtain this...
     Y  m   X1    X2
 1   1  . 12.0    0.8
 1   1  . 12.0    0.8
 1   1  . 12.0    0.8
 2   1  .  4.1   67.5
 2   0  .  4.1   67.5
 2   0  .  4.1   67.5
 2   0  .  4.1   67.5
 3   1  .  2.4   12.4
3   0  .  2.4   12.4
 3   0  .  2.4   12.4
 4   1  . 11.2    7.7
 4   1  . 11.2    7.7

 Thanks in advance,

Ribeiro


       
---------------------------------

	[[alternative HTML version deleted]]

