title: How to count conditional occurence in R?
body: <p>I have a set of data :</p>
  
  <pre><code>Color Type axe
  
  Green  1    2
  
  Green  1    3
  
  Green  0    1
  
  Black  1    1
  
  Black  0    2
  
  Black  0    3
  </code></pre>
  
  <p>I want to return a table that tells me how many time a 'Type' is green or black and a 'axe' is green or black.</p>
  
  <pre><code>Type 
  
  1   Green : 2 Black : 1
  
  0   Green : 1 Black : 2
  
  Axe
  
  1   Green : 1 Black : 1
  
  2   Green : 1 Black : 1
  
  3   Green : 1 Black : 1
  </code></pre>
  
  <p>So a conditional count. I wanted to use the function 'table', but it just does a column occurrence count.</p>
  
  <p>Thanks !</p>