title: How to spread using dcast?
body: <p>I'd like to write the <code>tidyr::spread</code> call below in terms of <code>reshape2::dcast</code></p>
  
  <pre><code>stocks &lt;- data.frame(
    time = as.Date('2009-01-01') + 0:9,
    X = rnorm(10, 0, 1),
    Y = rnorm(10, 0, 2),
    Z = rnorm(10, 0, 4)
  )
  stocksm &lt;- stocks %&gt;% gather(stock, price, -time)
  
  stocksm %&gt;% spread(time, price)
  </code></pre>
  
  <p>I'm having trouble figuring out what to pass to <code>fun.aggregate</code></p>