title: Is there an R dplyr method for merge with all=TRUE?
body: <p>I have two R dataframes I want to merge. In straight R you can do:</p>
  
  <pre><code>cost &lt;- data.frame(farm=c('farm A', 'office'), cost=c(10, 100))
  trees &lt;- data.frame(farm=c('farm A', 'farm B'), trees=c(20,30))
  merge(cost, trees, all=TRUE)
  </code></pre>
  
  <p>which produces:</p>
  
  <pre><code>    farm cost trees
  1 farm A   10    20
  2 office  100    NA
  3 farm B   NA    30
  </code></pre>
  
  <p>I am using <code>dplyr</code>, and would prefer a solution such as:</p>
  
  <pre><code>left_join(cost, trees)
  </code></pre>
  
  <p>which produces something close to what I want:</p>
  
  <pre><code>    farm cost trees
  1 farm A   10    20
  2 office  100    NA
  </code></pre>
  
  <p>In <code>dplyr</code> I can see <code>left_join</code>, <code>inner_join</code>, <code>semi_join</code> and <code>anti-join</code>, but none of these does what <code>merge</code> with <code>all=TRUE</code> does.</p>
  
  <p>Also - is there a quick way to set the NAs to 0? My efforts so far using <code>x$trees[is.na(x$trees)] &lt;- 0;</code> are laborious (I need a command per column) and don't always seem to work.</p>
  
  <p>thanks</p>