R how to calculate 'Percentage of Change' between two rows?
<ul>
<li>I like to compute 'Percentage of change between two rows' while Item
changes in rows.  </li>
<li><p>For first row of items, I am ok to place some text or blank
(example ‘skip’ or blank is ok) because of no comparison of previous row for same
item</p>

<pre><code>df &lt;- data.frame(period=rep(1:4,2), 
             farm=c(rep('A',4),rep('B',4)), 
             cumVol=c(1,5,15,31,10,12,16,24), item=c(rep('Z',3),rep('Y',3),rep('X',2)),
             other = 1:8);
</code></pre></li>
</ul>

<p>My desired out put of 'Percentage_Change' column (additional column to dataset) would be like below. (Formula: 100/Previous Item row value * current row Item value...Example for 2nd row..100/1 * 5 = 500)</p>

<pre><code>Row Percentage_Change
1   Skip
2   500
3   300
4   Skip
5   32.25806452
6   120
7   Skip
8   150
</code></pre>

<p>Thanks for all your help.</p>