title: Set names of dataframes inside lists
body: <p>I've got a rather large list that contains many dataframes of the same length. I'd like to rename all the column names in the list. I've tried to use <code>purrr::map</code>, but have hit various issues. Is there a better way to do this?</p>
  
  <p>Here is a <code>reprex</code> of the approach and issues I'm having with it. Thanks. </p>
  
  <pre><code>library(tidyverse)
  
  
  org_names &lt;- names(
      starwars %&gt;% 
          select_if(
          Negate(is.list))
                     )
  
  df &lt;- starwars %&gt;% 
      select_if(Negate(is.list))
  
  names(df) &lt;- sample(LETTERS, length(df), replace = F)
  
  
  
  df_ls &lt;- list(df, list(df, df), list(df, df, df), df, list(df, df))
  
  
  map(df_ls, function(x){
      x %&gt;% 
          set_names(org_names)
  })
  #&gt; `nm` must be `NULL` or a character vector the same length as `x`
  </code></pre>