Join two tables but fill common column
<p>I have a data frame <code>left</code> with columns <code>name</code> and <code>x</code>, and I want to match the missing <code>x</code> entries with the corresponding <code>name</code> entries from a data frame <code>right</code>:</p>

<pre><code>left = data.frame(
  name = c("Bob", "Billy", "Roger", "Anna", "Kathy"),
  x = c(NA, NA, NA, 4, 5)
)

# &gt; left
#   name  x
# 1 Bob   NA
# 2 Billy NA
# 3 Roger NA
# 4 Anna   4
# 5 Kathy  5

right = data.frame(
  name = c("Bob", "Billy", "Roger"),
  x = c(1, 2, 3)
)

# &gt; right
#   name  x
# 1 Bob   1
# 2 Billy 2
# 3 Roger 3
</code></pre>

<p>A <code>left_join</code> gives me two columns</p>

<pre><code>&gt; left_join(left, right, by="name")
   name x.x x.y
1 Bob    NA   1
2 Billy  NA   2
3 Roger  NA   3
4 Anna    4  NA
5 Kathy   5  NA
</code></pre>

<p>But what I want is:</p>

<pre><code>    name x 
1 Bob     1   
2 Billy   2   
3 Roger   3   
4 Anna    4  
5 Kathy   5  
</code></pre>

<p>Can I do this with a join command?</p>