title: How to convert row names to column names and bind it by order in r
body: <p>I am working on a data set:
  <a href="https://i.stack.imgur.com/V1aqZ.png" rel="nofollow noreferrer">Annual Returns by Ticker</a></p>
  
  <p>and I want to convert to : <a href="https://i.stack.imgur.com/pRPWS.png" rel="nofollow noreferrer">Result Matrix</a></p>
  
  <p>I used the code: </p>
  
  <p>returns.df &lt;- returns %>% spread(key = DATE, value = RETURN) </p>
  
  <p>and its is showing wrong order: <a href="https://i.stack.imgur.com/oNEVn.png" rel="nofollow noreferrer">enter image description here</a></p>