title: Exporting R lm model with multiple dependent variables to csv
body: <p>I have the following lm with a vector of dependent variables:</p>
  
  <pre><code>fit&lt;-lm(cbind(X1m, X3m, X6m, X1y, X2y, X3y, X5y, X6y, X10y, 
                   X20y, X30y) ~ (ff + dc), data = yields)
  </code></pre>
  
  <p>When attempting to export the entire output to a csv file, I get this error:</p>
  
  <pre><code>write.csv(summary(fit),"fit.csv")
  Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) :     
  cannot coerce class ""listof"" to a data.frame
  </code></pre>
  
  <p>Exporting the coefficients only yields no error:</p>
  
  <pre><code>write.csv(coef(fit), "fit.csv")
  </code></pre>
  
  <p>I would like, however, to have t-statistics and standard errors along with my coefficients in a neatly formatted csv, so as to copy into word documents, presentations, etc.</p>
  
  <p>I know this problem has to do with the fact that the dependent variables are a list (vector). Any thoughts or suggestions would be appreciated. The sample data can be found <a href="https://www.dropbox.com/s/qgge4y519719q9s/yields.csv?dl=0" rel="nofollow">here</a>.</p>