R - Permute (sample) column with a particular value
<p>I want to permute a related column of a column that have a particular value</p>

<pre><code>&gt; mmm
   Name Value OtherVal
1  Mike     1   Value2
2  John     2   Value2
3  John     3   Value1
4  John     4   Value2
5  Mike     5   Value1
6  Mike     6   Value1
7  Mike     7   Value2
8  John     8   Value1
9  Mike     9   Value1
10 John    10   Value2
</code></pre>

<p>I want all of the Rows that have the name John and permute the Value Column, like this:</p>

<pre><code>&gt; mmm
   Name Value OtherVal
1  Mike     1   Value2
2  John     3   Value2
3  John     4   Value1
4  John     2   Value2
5  Mike     5   Value1
6  Mike     6   Value1
7  Mike     7   Value2
8  John     10  Value1
9  Mike     9   Value1
10 John     8   Value2
</code></pre>

<p>I don't want the name or OtherVal column to change.</p>