title: Export summary of multiple regressions from list
body: <p>I have a list of multiple regressions completed via this code using the standard dataset <code>mtcars</code>. </p>
  
  <pre><code>models &lt;- lapply(paste("mpg", names(mtcars)[-1], sep = "~"), formula)
  res.models &lt;- lapply(models, FUN = function(x) {summary(lm(formula = x, data = mtcars))})
  names(res.models) &lt;- paste("mpg", names(mtcars)[-1], sep = "~")
  </code></pre>
  
  <p>Where I now have a list of multiple regressions against the first column "mpg". From here I am trying to export certain summary statistics such as; intercept, coefficient and r.squared. </p>
  
  <p>I have tried using a loop which I've included below.</p>
  
  <pre><code>for (i in 1:length(res.models))
  {
    res &lt;- res.models[[i]]
    res_bound &lt;- NULL
    intercept &lt;- res$coefficients[1]
    coef &lt;- res$coefficients[2]
    r &lt;- res$r.squared
    res_bound &lt;- cbind(intercept, coef, r)
  }
  </code></pre>
  
  <p>Although this gets me a <code>dataframe</code> it only includes the results from the last regression model, a 1 row by 3 column <code>dataframe</code>. Furthermore, I would like to have the "terms" of each regression in the table to distinguish between which model I am looking at (e.g. mpg vs cyl or mpg vs hp).</p>
  
  <p>Am I simply missing a step in my loop? The ultimate goal is to <code>write.csv</code> the final <code>dataframe</code>. </p>