title: R - merge() returns NA´s in ALL columns although all.x=T
body: <p>I am new here and have searched the forum for my problem, but did not find a solution. 
  I have two data frames which I want to merge on a common key field.</p>
  
  <pre><code>          merge(x
                 ,y
                 ,by.x="a"
                 ,by.y="b"
                 ,all.x=T
                 ,sort=F
                 )
  </code></pre>
  
  <p>Since my x-Dataframe has more rows than my y-Dataframe, I want to keep all rows from x with NA for the column from y but with all values in the columns from x. This code is only giving me extra rows for the unmatched cases with NA in ALL columns (columns from x and y). I would be really grateful if someone could help me out? Where is my mistake?</p>
  
  <p>Example:</p>
  
  <pre><code>a = data.frame(c(111,222,333,444),c(1,5,3,8))
  b = data.frame(c(111,222),c(0.1,0.4))
  colnames(a)=c("code","value")
  colnames(b)=c("code","value")
  c = merge(a
            ,b
            ,by="code"
            ,all.x=T)
  </code></pre>
  
  <p>In this example it is working properly. In my data I obtain NA in all columns in row 3&amp;4.</p>
  
  <p>I hope you can understand my lousy example?!</p>
  
  <p>Thank you!
  Jessica ;)</p>