title: R Include lists of Strings in Dataframe
body: <p>I am trying to create an artificial dataframe of words contributed and deleted by users of Wikipedia for each edit that they make, the end result should look  like this:</p>
  
  <p><a href="https://i.stack.imgur.com/92FYv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/92FYv.png" alt="Example of Dataframe"></a></p>
  
  <p>I created some artifical data to build such a frame but I'm having problems with the variables "Tokens Added" and "Tokens deleted".</p>
  
  <p>I thought creating them as lists of lists would allow me to include them in dataframes even if the elements do not always have equal length. But apparently thats not the case. Instead, R creates a variable for each individual token. thats not feasible because it would create millions of variables. Here is some code to exemplify:</p>
  
  <pre><code>a &lt;- c(1,2,3)
  e &lt;- list(b = as.list(c("a","b")),c = as.list(c(1L,3L,5L,4L)),d = as.list(c(TRUE,FALSE,TRUE)))
  
  DF &lt;- cbind(a,e)
  U &lt;- data.frame(a,e)
  </code></pre>
  
  <p>I would like to have it like this:</p>
  
  <p><a href="https://i.stack.imgur.com/gaP65.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gaP65.png" alt="Example of desired Frame"></a></p>
  
  <p>Is this possible at all in R with dataframes (I tried dearching for answers already but they were either for different questions or too technical for me)? Any help is much appreciated!</p>