title: compute an index group by factors and plot with ggplot
body: <p>I want to compute various index with their confidence interval according to factors and display in a graph using <code>ggplot2</code>.</p>
  
  <p>In column, <code>1=positif</code> and <code>0=negatif;</code> <code>"individual=1"</code> means that 1 individual was tested.
  the following index have to be computed per <code>species+population+pathogen+dpi</code></p>
  
  <p>...
      example: <code>AL: yu: dv: 21dpi infectrate =(2/3)*100;  dissemrate = (2/2)*100; 
      transrate = (2/2)*100; st=(220+100)/2 ##mean for the population, the 
      pathogen and the dpi</code></p>
  
  <pre><code>     AL: ti  dv: 21dpi infectrate = (2/4)*100
  
  infectrate = (number positif/number of individuals tested)*100;
  dissemrate = (number positif$dissem/number positif$infect)*100;
  transrate = (number positif$trans/number positif$dissem)*100;
  strate = mean($st);
  
  species population  individual  pathogen    dpi infect  dissem  trans   st
  AL  yu  1   dv  21  1   1   1   220
  AL  yu  2   dv  21  1   1   1   100
  AL  yu  3   dv  21  0   0   0   0
  AL  ti  1   dv  21  0   0   0   0
  AL  ti  2   dv  21  1   1   1   60
  AL  ti  3   dv  21  1   1   0   0
  AL  ti  4   dv  21  0   0   0   0
  AA  dla 1   dv  21  1   1   1   180
  AA  dla 2   dv  21  1   1   0   0
  AA  dla 3   dv  21  1   1   1   360
  AL  yu  1   zk  21  0   0   0   0
  AL  yu  2   zk  21  0   0   0   0
  AA  mra 1   zk  14  1   1       
  AA  mra 2   zk  14  1   1       
  AA  yu  1   yv  21  0   0   0   0
  AA  yu  2   yv  21  1   1   0   0
  AL  bz  1   zk  14  1   1       
  AL  bz  2   zk  14  1   1       
  
  I've tried to use the dplyr package, but I didn't succeed.
  </code></pre>
  
  <p>...</p>
  
  <p>When I compute the code, it gives the same value for all the population for an index.</p>
  
  <p>Any help is needed, Thanks in advance.</p>