title: Convert data in R
body: <p>I have the following data frame.   </p>
  
  <pre><code>       employee task
  t1        e4     t1
  t2        e3     t2
  t3        e5     t3
  t4        e6     t4
  t5        e5     t5
  t6        e3     t6
  t7        e6     t7
  t8        e3     t8
  t9        e1     t9
  t10       e1    t10
  t11       e3    t11
  t12       e5    t12
  t13       e1    t13
  t14       e3    t14
  t15       e6    t15
  t16       e1    t16
  t17       e4    t17
  t18       e2    t18
  t19       e3    t19
  t20       e2    t20
  t21       e4    t21
  t22       e3    t22
  t23       e6    t23
  t24       e1    t24
  t25       e6    t25
  t26       e1    t26
  t27       e4    t27
  t28       e6    t28
  t29       e3    t29
  t30       e1    t30
  t31       e2    t31
  t32       e1    t32
  t33       e4    t33
  t34       e2    t34
  t35       e3    t35
  t36       e2    t36
  t37       e6    t37
  t38       e6    t38
  t39       e1    t39
  t40       e3    t40
  </code></pre>
  
  <p>I need to convert it in order to get a dataframe where there is a column for each employee filled with their respective tasks.</p>
  
  <p>I tried to do that using</p>
  
  <pre><code>reshape(dfts, idvar = "employee",
      timevar = "task", direction = "wide")
  </code></pre>
  
  <p>but doesn´t work</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>