title: Linear Regression loop for each independent variable individually against dependent
body: <p>I want to figure out how to create a loop or using one of the apply functions to get individual 1:1 regression information for each variable in a dataset against the dependent variable.</p>
  
  <p>Lets say I am using mtcars.  How would I write in R code that takes each variable in the data frame and regresses it against MPG? </p>
  
  <p>Even better would be getting a summary of each independent variable with and having some sort of name assignment such as x1=, x2=etc</p>
  
  <pre><code>summary(lm(mpg~eachvar,data=mtcars))
  </code></pre>