title: Count Occurrences of a List in R
body: <p>I have a list of roughly 100,000 occurrences of items being ordered together that I have pasted into one column so I can count the number of times each combination occurs. <br></p>
  
  <pre><code>4845   Curly Fries California Burger   1
  4846   French Fries California Burger  1
  4847   Hamburger California Burger     1
  4848   $1 Fountain Drinks Curly Fries  1
  4849   $1 Fountain Drinks Curly Fries  1
  4850   California Burger Curly Fries   1
  4851   Curly Fries Curly Fries         1
  </code></pre>
  
  <p>I have explored the aggregate function which gives me the following error: <br></p>
  
  <pre><code>aggregate(t1$count,list(t1$pc), sum) &lt;br&gt;
  Error in sort.list(y) : 'x' must be atomic for 'sort.list'
  Have you called 'sort' on a list? &lt;br&gt;
  </code></pre>
  
  <p>I have also tried variations of ddply: <br></p>
  
  <pre><code>ddply(t1,t1$pc,transform,occurances=sum(t1$count))
  </code></pre>
  
  <p>But I get this error</p>
  
  <pre><code>Error in UseMethod("as.quoted") : 
  no applicable method for 'as.quoted' applied to an object of class "c('matrix', 'list')"
  </code></pre>
  
  <p>I am assuming I get this because I am trying to essentially "group" by a character value. I have also explored <code>tapply</code> and <code>recast</code> based on answers to similar questions, but to no avail. <br></p>
  
  <p>How can I get this count of combinations?</p>
  
  <p>For consideration, a sample of items listed separately (again, apologies for the formatting issues): <br></p>
  
  <pre><code>                   Var1                     Var2 Var3
  &gt;2               Onion Rings              Onion Rings    1
  &gt;3  Pineapple Cheddar Burger              Onion Rings    1
  &gt;4               Onion Rings Pineapple Cheddar Burger    1
  &gt;5  Pineapple Cheddar Burger Pineapple Cheddar Burger    1
  &gt;5              Onion Rings              Onion Rings     1
  &gt;6  Pineapple Cheddar Burger              Onion Rings    1
  &gt;7               Onion Rings Pineapple Cheddar Burger    1
  &gt;8  Pineapple Cheddar Burger Pineapple Cheddar Burger    1
  &gt;9             Fountain Soda            Fountain Soda    1
  &gt;10             French Fries            Fountain Soda    1
  </code></pre>