title: How to export coefficients of the regression analysis fto a spreadsheet or csv file?
body: <p>I am new to RStudio and I guess my question is pretty easy to solve but a lot of searching did not help me. </p>
  
  <p>I am running a regression and <code>summary(regression1)</code> shows me all the coefficients and so on. 
  Now I am using <code>coef(regression1)</code> so it only gives me the coefficients which I want to export to a file. </p>
  
  <p><code>write.csv(coef, file="regression1.csv)</code> and the <code>"Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class ""function"" to a data.frame"</code> occurs. </p>
  
  <p>Would be great If you could help me. I am searching the web for a few hours now and was not successful. </p>
  
  <p>Do I have to change <code>coef</code> somehow so it fits in a data.frame?</p>
  
  <p>Thank you very much!  </p>