title: Rename by list() variable name rather than index in R
body: <p>I am running regressions over a list() of items using a for loop and I would like to replace the reference to the given list input with the name of that variable rather than its index. For example:</p>
  
  <pre><code>frame &lt;- data.frame(y = rnorm(10), x1 = rnorm(10), x2 = rnorm(10), x3 = rnorm(10) ) 
  x.list &lt;- list(frame$x1,frame$x2,frame$x3)  
  fit &lt;- list()
  
  for(i in 1:length(x.list)){ fit[[i]] &lt;- summary(lm(frame$y ~ x.list[[i]]))}         
  fit
  </code></pre>
  
  <p>I would like each item in fit to refer to "x1", "x2", "x3" instead of "x.list[[i]]". Thanks for any thoughts on this. </p>