title: rbinding with a list containing empty lists for NAs in R
body: <p>I have a nested list with some elements as empty list (extract):</p>
  
  <pre><code> str(myList)
   List of 100
   $ :'data.frame':   2 obs. of  10 variables:
    ..$ _index          : chr [1:2] "alias_fr" "alias_fr"
    ..$ _type           : chr [1:2] "triplet" "triplet"
    ..$ _id             : chr [1:2] "Q9327" "Q3122270"
   $ : list()
   $ :'data.frame':   1 obs. of  9 variables:
    ..$ _index          : chr "alias_fr"
    ..$ _type           : chr "triplet"
    ..$ _id             : chr "Q17009"
  </code></pre>
  
  <p>I need to index each element, using bind_rows:</p>
  
  <pre><code>df &lt;- bind_rows(myList, .id = "id")
  </code></pre>
  
  <p>Unfortunately, the empty elements (second one in the example) are deleted, the consequences being a bad indexing (shift of indexes):</p>
  
  <pre><code>  id   _index   _type      _id
  1  1 alias_fr triplet    Q9327
  2  1 alias_fr triplet Q3122270
  3  2 alias_fr triplet   Q17009
  </code></pre>
  
  <p>What I expect:</p>
  
  <pre><code>  id   _index   _type      _id
  1  1 alias_fr triplet    Q9327
  2  1 alias_fr triplet Q3122270
  3  2 NA       NA      NA
  3  3 alias_fr triplet   Q17009
  </code></pre>
  
  <p>I have already tried several methods without any success: </p>
  
  <p><a href="https://stackoverflow.com/questions/40379021/function-to-change-null-to-na">Function to change Null to NA</a></p>
  
  <p><a href="https://stackoverflow.com/questions/15793759/convert-r-list-to-dataframe-with-missing-null-elements">Convert R list to dataframe with missing/NULL elements</a>
  ...</p>
  
  <p>Is there a way to make the empty elements taken into account with bind_rows?</p>