title: Vector different length after unlist
body: <p>I'm trying to convert a list to a vector so I can attach it to a dataframe but it's throwing an error.  After unlisting the list, it became shorter and I'm not sure why.</p>
  
  <p>Thanks, any help is greatly appreciated.</p>
  
  <pre><code>&gt; mongo_jr$last_state &lt;- unlist(last_state)
  Error in `$&lt;-.data.frame`(`*tmp*`, "last_state", value = c("created",  : 
    replacement has 203819 rows, data has 203823
  
  &gt; str(last_state)
  List of 203823
  
  x &lt;- unlist(last_state)
  
  &gt; str(x)
   chr [1:203819] "created" "created" "created" "created" "created" "created" "created" "created" ...
  </code></pre>