title: R looping anova and pick data frame names from list
body: <p>Below is a working R script. I want to anova data frames dfa and then dfb - but 
  the aov function only reads the first data frame. I have searched but not found a solution. It is more important that the script is easy to read than computing efficiency.
  How can I make aov to loop through the data frames?
  Thanks in advance.</p>
  
  <pre><code>#two dummy data frames
  Obs &lt;- c(1,2,1,4,5,6) ;Treat &lt;- c(1,1,1,2,2,2)
  dfa &lt;- data.frame(Obs=Obs, Treat=Treat) 
  Obs2 &lt;- c(10,22,10,43,52,60)
  dfb &lt;- data.frame(Obs=Obs2, Treat=Treat)
  Names &lt;- c("dfa","dfb")
  
  #  Loop here but cannot get it to work with calling data frame names just repeats first analysis - dfb has quite different values
  for(i in 1:2) { 
  print(summary(aov( Obs ~ Treat, data=as.data.frame(Names[i]))))  
  print(Names[i])
  }
  </code></pre>