title: R: split elements of a list into sublists
body: <p>I have a data frame with following structure: </p>
  
  <pre><code>pat &lt;- c(rep(1,50), rep(2,50), rep(3,50))
  inc &lt;- rep(c(rep(1,5), rep(2,5), rep(3,5), rep(4,5), rep(5,5),
               rep(6,5), rep(7,5), rep(8,5), rep(9,5), rep(10,5)), 3)
  df &lt;- data.frame(cbind(pat, inc))
  </code></pre>
  
  <p>df is split into a list of elements:</p>
  
  <pre><code>all.inc = split(df, inc)
  </code></pre>
  
  <p>Now I want to split each element of this list into sub-lists. Something like:</p>
  
  <pre><code>all.pat = split(all.inc, pat)
  </code></pre>
  
  <p>This doesn't work, obviously. I've already tried the <code>plyr</code> functions and <code>lapply</code>, but didn't get it to work.</p>
  
  <p>Any ideas?</p>