title: Changing Column names of multiple data frames using a for loop with data frames loaded into a List
body: <p>I am trying to change the variable names in all data frames in a for loop. Any example of the data is:  </p>
  
  <pre><code>df1 &lt;- data.frame(
    Number = c(45,62,27,34,37,55,40),
    Day = c("Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"))
  df2 &lt;- data.frame(
    Number = c(15,20,32,21,17,18,13),
    Day = c("Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"))
  df3 &lt;- data.frame(
    Number = c(12,32,22,14,16,21,30),
    Day = c("Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun")
  
  L &lt;- list(df1,df2,df3)
  </code></pre>
  
  <p>My current attempt is:</p>
  
  <pre><code>for(i in L){
  colnames(L) &lt;- c("NewName1", "NewName2")
  }
  </code></pre>
  
  <p>Which is not working, I do not understand why it is not working. Please let me know if someone can guide me in the right direction. </p>