title: apply merge to a list of data.frames
body: <p>I have a list of data.frames with just one column and a <code>character</code> value:</p>
  
  <pre><code>&gt; list.df[c(1,5,8)]
  $1
       X..1L..
  1      A
  2      B
  3      C
  4      D
  5      E
  6      F
  7      G
  8      H
  
  $5
     X..5L..
  1    A
  2    C
  3    D
  4    F
  5    G
  
  $8
     X..8L..
  1   A
  2   D
  3   F
  4   G
  5   H
  6   I
  </code></pre>
  
  <p>And another data.frame</p>
  
  <pre><code>&gt; df
    V2  V5      V9
  1  A  31 0.13029
  2  B  80 0.29443
  3  C 166 0.01354
  4  D  11 0.39589
  5  E  62 0.61794
  6  F  40 0.35808
  7  G  31 0.62581
  8  H  54 0.24983
  9  I  19 0.47199
  10 J  97 0.26518
  </code></pre>
  
  <p>I would like to merge each data.frame in the list with <code>df</code>, I've tried creating a function 
     <code>func &lt;- function(x,y){merge(x, y, by.x=x[,1], by.y=y[,1])}</code> and then applying it to the list but it does not work.</p>
  
  <pre><code>lapply(list.df, func, list.df, df)
  </code></pre>
  
  <p>I know that I can split <code>list.df</code> in several data.frames and then <code>merge</code> each of them individually, but I was wondering if there is a way to do it in the <code>list</code></p>
  
  <p>Thanks</p>