Removing duplicates while preserving values : <p>I have a tabular table example here:</p>

<pre><code>Jerry 2
John 3
Mark 4
John 1
Kevin 10
</code></pre>

<p>I want to remove duplicate entries, John in this case, but want to preserve the value and add them up. Not sure if that made sense, but it should look like:</p>

<pre><code>Jerry 2
John 4
Mark 4
Kevin 10
</code></pre>

<p>Any ideas of how to do this in R? I know how to remove duplicates but not add up all of the duplicate values.</p>

<p>Thanks.</p>
