title: Table of Interactions - Case with pets and houses
body: <p>I have a list of houses and a list of animal species.</p>
  
  <pre><code>houses = c(1,1,2,3,4,4,4,4,5,6,5)
  animals = c('cat','dog','cat','dog','rat', 'cat', 'spider', 'snake', 'cat', 'cat', 'rat')
  </code></pre>
  
  <p>I am trying to create a function that returns an upper triangular table that indicates for each pet, the number of times that it was observed to live in the same house than the other animal species. Does it make sense?</p>
  
  <p>For the above example, the table should look like this (hope there's no mistake!) :</p>
  
  <pre><code>    dog   rat   spider   snake
  cat  1     2      1        1      
  dog        0      0        0
  rat               1        1
  spider                     1
  </code></pre>
  
  <hr>
  
  <p>Note: This function should work for any two vectors of same lengths, whatever if they contain numbers or string</p>