title: write a function to calculate all employees' customer satisfaction level?
body: <p>So I have data about customers' satisfaction about our CS team service that looks like:</p>
  
  <pre><code>employee&lt;-c("A","A","A","B","B","B","C","C","C","D","D","D")
  incident&lt;-c(1,2,3,1,2,3,1,2,3,1,2,3)##number of incidents
  rating&lt;-c(0,2,0,1,0,2,0,0,2,1,2,2)## 0 means there is no rating, 1 means "not satisfied", 2 means "satisfied"
  data.frame(employee, incident,rating)
  ##satisfaction level for each employee= (number of "satisfied"-number of "unsatisfied")/number of all incident (eg. for employee A, the satisfaction level is(1-0)/3). for B, it's (1-1)/3)
  </code></pre>
  
  <p>I know how to calculate each employee's performance and plot it, but what if I have 1000 employees, can anyone help me to write a function which is able to generate the customer satisfaction level of all employees(and maybe have all of them in a single plot)?</p>