title: Put nested lists of different lengths into a dataframe one bellow another
body: <p>How can i put this lists of lists together in a dataframe, inside a for loop? That is, how do I bypass the error:</p>
  
  <pre><code> Error in (function (..., row.names = NULL, check.rows = FALSE, check.names =  
   TRUE, : arguments imply differing number of rows: 50, 30, 20
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>ListA=list(firstA=1:50, secondA=1:50,thirdA=1:50)
  ListB=list(firstB=1:30, secondB=1:30, thirdB=1:30)
  ListC=list(firstC=1:20, secondC=1:20, thirdC=1:20)
  
  NestedList=list(ListA,ListB,ListC)
  
  DataToWrite=list()
  
  for (i in 1:length(NestedList)){
      DataToWrite=c(DataToWrite,NestedList[i]) 
      }
  #at the next step i get the error 
  df=as.data.frame(DataToWrite)
  </code></pre>
  
  <p>What i want is to add each list in the for loop to in the same columns of the previous one, at the end of the previous list, in a dataframe. What i want looks like in the picture:
  <a href="https://i.stack.imgur.com/cWSPe.jpg" rel="nofollow noreferrer">example of structure that I would like to obtain</a></p>
  
  <p>I do not care about the column names, I would like to keep the names of the first list. Note that the list "columns" names will be different for each list and that may also present a problem when merging to data.frame.</p>