title: Adding two vectors by names
body: <p>I have two named vectors</p>
  
  <pre><code>v1 &lt;- 1:4
  v2 &lt;- 3:5
  names(v1) &lt;- c("a", "b", "c", "d")
  names(v2) &lt;- c("c", "e", "d")
  </code></pre>
  
  <p>I want to add them up by the names, i.e. the expected result is</p>
  
  <pre><code>&gt; v3  
  a b c d e   
  1 2 6 9 4
  </code></pre>
  
  <p>Is there a way to programmatically do this in R? Note the names may not necessarily be in a sorted order, like in <code>v2</code> above.</p>