title: Like dcast but without sum of data
body: <p>I have data organized for the R survival package, but want to export it to work in Graphpad Prism, which uses a different structure.</p>
  
  <pre><code>#Example data
  Treatment&lt;-c("A","A","A","A","A","B","B","B","B","B")
  Time&lt;-c(3,4,5,5,5,1,2,2,3,5)
  Status&lt;-c(1,1,0,0,0,1,1,1,1,1)
  df&lt;-data.frame(Treatment,Time,Status)
  </code></pre>
  
  <p>The R survival package data structure looks like this</p>
  
  <pre><code>Treatment Time Status
  A           3     1
  A           4     1
  A           5     0
  A           5     0
  A           5     0
  B           1     1
  B           2     1
  B           2     1
  B           3     1
  B           5     1
  </code></pre>
  
  <p>The output I need organizes each treatment as one column, and then sorts by time. Each individual is then recorded as a 1 or 0 according to its Status. The output should look like this:</p>
  
  <pre><code>Time        A             B
  1                         1
  2                         1
  2                         1
  3           1             1
  4           1                         
  5           0             1
  5           0             
  5           0             
  </code></pre>
  
  <p>dcast() does something similar to what I want, but it sums up the Status values and merges them into one cell for all individuals with matching Time values.</p>
  
  <p>Thanks for any help!</p>