title: How to extract permutations of all unique factor levels within a list
body: <p>I have three columns in a data frame in which I want to list all the possible combinations for each column variable: Condition, level and Response.</p>
  
  <pre><code>Df &lt;- data.frame(
    Condition = c(rep("No", 20), rep("Yes",20)),
    Level = c(rep(1,10),rep(2,10),rep(1,10),rep(2,10)),
    Response = c(rep("Excellent",5),rep("Good",5),rep("Average",5), rep("Bad",5))
    )
  
  &gt; Df
     Condition Level  Response
  1         No     1 Excellent
  2         No     1 Excellent
  :          :     :        :
  39       Yes     2       Bad
  40       Yes     2       Bad
  </code></pre>
  
  <p>Here is an example of a desired output. I could use a nested for-loop and shorten this code. But i'm not looking for a for-loop as i'm sure there is a more efficient way to do this!</p>
  
  <pre><code>Output &lt;- list()
  
  Output[[1]] &lt;- data.frame(
    Condition = c(rep("No",5)),
    Level = c(rep(1,5)),
    Response = c(rep("Excellent",5))
  )
  Output[[2]] &lt;- data.frame(
    Condition = c(rep("No",5)),
    Level = c(rep(1,5)),
    Response = c(rep("Good",5))
  )
  #All possible combination till Output[[8]]
  Output[[8]] &lt;- data.frame(
    Condition = c(rep("Yes",5)),
    Level = c(rep(2,5)),
    Response = c(rep("Bad",5))
  
  
  &gt; Output
  [[1]]
    Condition Level  Response
  1        No     1 Excellent
  2        No     1 Excellent
  3        No     1 Excellent
  4        No     1 Excellent
  5        No     1 Excellent
  
  [[2]]
    Condition Level Response
  1        No     1     Good
  2        No     1     Good
  3        No     1     Good
  4        No     1     Good
  5        No     1     Good
  :
  [[8]]
    Condition Level Response
  1       Yes     2      Bad
  2       Yes     2      Bad
  3       Yes     2      Bad
  4       Yes     2      Bad
  5       Yes     2      Bad
  </code></pre>