title: Find powerset of all unique combinations of vector of strings
body: <p>I am trying to find all of the unique groupings of a vector/list of items, length 39.  Below is the code I have:</p>
  
  <pre><code>x &lt;- c("Dominion","progress","scarolina","tampa","tva","TminKTYS",
         "TmaxKTYS","TminKBNA","TmaxKBNA","TminKMEM","TmaxKMEM",
         "TminKCRW","TmaxKCRW","TminKROA","TmaxKROA","TminKCLT",
         "TmaxKCLT","TminKCHS","TmaxKCHS","TminKATL","TmaxKATL",
         "TminKCMH","TmaxKCMH","TminKJAX","TmaxKJAX","TminKLTH",
         "TmaxKLTH","TminKMCO","TmaxKMCO","TminKMIA","TmaxKMIA",
         "TminKPTA","TmaxKTPA","TminKPNS","TmaxKPNS","TminKLEX",
         "TmaxKLEX","TminKSDF","TmaxKSDF")
  
  # Generate a list with the combinations  
  zz &lt;- sapply(seq_along(x), function(y) combn(x,y))
  # Filter out all the duplicates
  sapply(zz, function(z) t(unique(t(z)))) 
  </code></pre>
  
  <p>However, the code causes my computer to run out of memory.  Is there a better way to do this?  I realize I have a large list. thanks.</p>