title: Using R and purrr to join multiple dataframes using a list of lists with pmap
body: <p>I'm trying to join together dataframes that are embedded in a list using pmap.</p>
  
  <pre><code>library(purrr)
  library(plyr)
  # Create a list of 5 data frames
  create_df &lt;- function(){
        map(1:5, ~ data.frame(country = c("USA", "CHINA", "JAPAN", "FRANCE"),
                                           col = sample.int(100, 4))
        )
      }
  # Create a list of lists
  list_of_list_of_dataframes &lt;- map(1:3, ~ create_df())
  # join the first element of the 3 lists together. 
  list_of_dataframes &lt;- pmap(list_of_list_of_dataframes, join_all, by = 'country', type = 'left')
  </code></pre>
  
  <p>The problem that I have is that this <code>join_all</code> function from plyr doesn't seem to work. I get the error:
  <code>Error in .f(.l[[c(1L, i)]], .l[[c(2L, i)]], .l[[c(3L, i)]], ...) : 
    unused argument (.l[[c(3, i)]])</code></p>
  
  <p>I am able to do <code>list_of_dataframes &lt;- pmap(list_of_list_of_dataframes, cbind)</code> to bind the data frames together but it doesn't delete the index columns that I'm matching too and assumes that the order of the left columns is the same. </p>