title: Taking Mixed-Length List to data.frame with correct headers
body: <p>I have a list that looks something like this, where the variables are of various lengths, and in a random order</p>
  
  <pre><code>&gt; my.list &lt;- lapply(list(c(2,1,3,4),c(2,3),c(4,2,3),c(1,3,4),c(1,4),c(2,4,1)),
    function(x)letters[x])
  &gt; my.list
  
  &gt;my.list   
  [[1]]
  [1] "b" "a" "c" "d"
  
  [[2]]
  [1] "b" "c"
  
  [[3]]
  [1] "d" "b" "c"
  
  [[4]]
  [1] "a" "c" "d"
  
  [[5]]
  [1] "a" "d"
  
  [[6]]
  [1] "b" "d" "a"
  </code></pre>
  
  <p>What I want to do is put this into a data frame, with NA where there are blanks. However, each row is in a random order, and I want each row in the data frame to be ordered such that it goes in alphabetical or numeric. Ideally the end result would look like the example below</p>
  
  <pre><code>&gt;df
      V1  V2  V3  V4
  1   a   b   c   d  
  2   NA  b   c   NA  
  3   NA  b   c   d  
  4   a   NA  c   d  
  5   a   NA  NA  d  
  6   a   b   NA  d  
  </code></pre>