title: Loop with column binding
body: <p>I am self-taught useR so please bear with me. </p>
  
  <p>I have something similar the following dataset:</p>
  
  <pre><code>individual  value
  a   0.917741317
  a   0.689673689
  a   0.846208486
  b   0.439198006
  b   0.366260159
  b   0.689985484
  c   0.703381117
  c   0.29467743
  c   0.252435687
  d   0.298108973
  d   0.42951805
  d   0.011187204
  e   0.078516181
  e   0.498118235
  e   0.003877632
  </code></pre>
  
  <p>I would like to create a matrix with the values for a in column1, values for b in column2, etc. [I also add a 1 at the bottom of every column for a later algebra operations] </p>
  
  <p>I have tried so far: </p>
  
  <pre><code>  for (i in unique(df$individual)) {
      values &lt;- subset(df$value, df$individual == i)
      m &lt;- cbind(c(values[1:3],1))
  
    }
  </code></pre>
  
  <p>I get a (4,1) matrix with the last individual values. What is missing to make it additive for each loop and get all as many columns as individuals?</p>