title: Error: x must be atomic for 'sort.list'
body: <p>This is weird. I get this error </p>
  
  <blockquote>
    <p>Error in sort.list(y) : 'x' must be atomic for 'sort.list'<br>
    Have you called 'sort' on a list?</p>
  </blockquote>
  
  <p>when I execute this code on a list</p>
  
  <pre><code> cc3 &lt;- as.data.frame(table(cc2))
  </code></pre>
  
  <p>What could possibly be wrong? </p>
  
  <p>this is a head of the list.</p>
  
  <pre><code>head(cc2)   
  V1
  1:    174
  2:    174
  3:    211
  4: 177106
  5: 177106
  6: 177106 
  </code></pre>
  
  <p>Edit:
  When I run, <code>str(cc2)</code>
  I get this</p>
  
  <pre><code>Classes ‘data.table’ and 'data.frame':  149706 obs. of  1 variable:
  $ V1:List of 149706
  ..$ : Named chr "174"
  .. ..- attr(*, "names")= chr "V11"
  ..$ : Named chr "174"
   .. ..- attr(*, "names")= chr "V7"
   ..$ : Named chr "211"
    .. ..- attr(*, "names")= chr "V6"
   .. [list output truncated]
   - attr(*, ".internal.selfref")=&lt;externalptr&gt; 
  </code></pre>