title: R: Counting Tuples in Dataframe
body: <p>I hope the title is wide but clear enough. Any hint, help very appreciated.</p>
  
  <p>I do have a Dataframe in R, given by three columns and around 70k rows. I have to do the following:</p>
  
  <p>Assuming, I identify the first two columns of a row with a tuple (x,y) and the column z as a 'key' which is associated to the tuple (x,y), I want to count how often the given tuple (x,y) is associated to z - whereas (x,y) could be associated to more than one key z. So, although this is the first step in analyzing the map (x,y) -> z, I think it would be convenient to have a dataframe giving me how often (x,y) is associated to z.</p>
  
  <p>For example:</p>
  
  <p>Adam, Germany, Accounting</p>
  
  <p>Bert, Austria, Operations</p>
  
  <p>Bert, Germany, HR</p>
  
  <p>Adam, Germany, HR</p>
  
  <p>And I would like to see:</p>
  
  <p>HR -> Bert, Germany;
        Adam, Germany</p>
  
  <p>Operations -> Bert, Austria</p>
  
  <p>Accounting -> Adam, Germany</p>