title: Convert xts to data.frame
body: <p>I work on a code to collect data from the S&amp;P500. I do get the data I need, but now I have for each stock a xts object that I want to convert to one big data.frame, so I can run an event study or create a chart.</p>
  
  <pre><code>url &lt;- "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
  tables &lt;- getURL(url)
  
  tables &lt;- readHTMLTable(tables, stringsAsFactors = F)
  sp500symbols &lt;- tables[[1]][,1:2]
  head(sp500symbols)
  rm(list="tables", "url")
  tix &lt;- c(sp500symbols$`Ticker symbol`)
  
  quantmod_list = tix
  for(company in quantmod_list) {  
    try(getSymbols(company, from="2009-12-29", to="2009-12-30"))
    print(company)
  }
  </code></pre>