How to calculate percentage of count to specific condition? : <p>I have data which look something like this.</p>

<pre><code>company  date  auditor  change  count
A        2016  ZXY      0       1
A        2015  ZXY      0       2
A        2014  ZXY      0       3
A        2013  FPQ      1       4
A        2012  ZXY      1       5
B        2017  ERW      0       1
B        2016  ERW      0       2
B        2015  ERW      0       3
B        2014  ERW      0       4
B        2013  ERW      0       5
.
.
.
.
</code></pre>

<p>This data tells whether auditor has switched in last five year. If there is switch then change value is '1'. I want to calculate</p>

<p>1) Percentage of companies who had switch in last year (count=1).</p>

<p>2) Percentage of companies who had no switch in last five year (change=0 for count=1,2,3,4,5).</p>

<p>3) Percentage of companies who experienced change more than once in five year (change=1 for count= more than once)</p>

<p>I just want the logic of how to do it.</p>
