title: How do I find frequency of combinations where combinations are specified as multiple rows?
body: <p>I am looking at location data and I have a list of individuals where I know specific locations and times. What I'm looking to understand is what are the most common combinations of locations within any given day.</p>
  
  <pre><code>id      location    date
  00231   home        2014-01-02
  00231   gas station 2014-01-02
  00231   home        2014-01-02
  02830   work        2014-01-02
  02830   home        2014-01-02
  00231   home        2014-01-04
  00231   mcdonalds   2014-01-04
  </code></pre>
  
  <p>As you can see there can be many individuals with varying lengths of location groups. How can I use R to find the frequency of all the potential combinations (for both 'order matters' and 'order doesn't matter'). Here is what I would like to see:</p>
  
  <pre><code>combination                  freq
  home-gas station-home        472
  work-home                    439
  home-walmart-home            209
  </code></pre>
  
  <p>Also to clarify, I don't need any other analytics on the locations for now, just looking for  a combination analysis.</p>
  
  <p>Thanks &amp; apologize if this is duplicate, but I couldn't find anything where the combinations were located on multiple rows (versus many of examples about combinations of variables/column values)</p>