title: colnames and mutate on multiple dataframes
body: <p>I have a problem with cleaning up my code. I understand I could type this all out but we don't want that obviously.<br />
  I have only dataframes in my global environment. They are all &quot;data.frame&quot;.
  I want to check the dimensions of all of them and put that in a tibble. I managed that somehow. I also would like to change their colnames() tolower() which works easy if I just type the name of the data.frame, but there's more than 2 and I want it done automatically. Then I also want to mutate all data.frames in the same way.</p>
  <p>Small example of my code:</p>
  <pre><code>library(tidyverse)
  x &lt;- data.frame(letters[1:2]) #To create the data
  y &lt;- data.frame(letters[3:4])
  dfs &lt;- as.list(ls()) #I take whatever is in my environment
  </code></pre>
  <p>I managed below to get a tibble of the dimensions:</p>
  <pre><code>z &lt;- as_tibble(lapply(seq_along(dfs),
              function(j) dim(get(dfs[[j]]))), .name_repair = &quot;unique&quot;)
  colnames(z) &lt;- dfs
  </code></pre>
  <p>Now for the colnames of all the data.frames stored in my list I basically want to perform this code:</p>
  <pre><code>colnames(dfs[[1]]) &lt;- tolower(colnames(dfs[[1]])
  </code></pre>
  <p>but that returns NULL as I found out earlier. So I used get() in there to make it work for the dimensions.  But if I use get() to assign colnames it says it can't find function &quot;get&lt;-&quot;.<br />
  Since all colnames for all dataframes are the same (just different nrows()) I could save the lowercase colnames as value and use that, but that doesn't take away that it cant find the get&lt;- function.</p>
  <pre><code>names &lt;- tolower(colnames(x))
  sapply(seq_along(dfs),
         function(j) colnames(get(dfs[[j]])) &lt;- names)
  *Error in colnames(get(dfs[[j]])) &lt;- names : 
    could not find function &quot;get&lt;-&quot;*
  </code></pre>
  <p>as for the mutating part I tried a for loop:</p>
  <pre><code>for(i in seq_along(dfs)){
    get(dfs[[i]]) &lt;- get(dfs[[i]]) %&gt;% mutate(cd = ab)
  }
  </code></pre>
  <p>But it's the same issue.
  Could anyone help clearing this problem for me? (and if a cleaner code for the dimensions is available that would be highly appreciated)</p>
  <p>I am just trying to up my coding skills. I would have been long done if I just typed it all out but that defeats the purpose.<br />
  Thanks!<br />
  -JK</p>