Save data frame containing a list column as a " delimited txt file
<p>I have a data frame of which one column is a list; e.g.</p>

<pre><code>x = c("Benny", "Johnny")
y1 = c("Product 1","Product 3","Product 4")
y2 = c("Product 1","Product 2")
myList = vector("list", 2)
myList[[1]] = y1
myList[[2]] = y2

productSales = data.frame(x, cbind(myList), stringsAsFactors = FALSE)
colnames(productSales) = c("Name", "Product")
</code></pre>

<p>I succeed to save <code>productSales</code> as a <code>txt</code> file through</p>

<pre><code>capture.output(twoDifferentPfFlags, file = "result.txt")
</code></pre>

<p>My problem with this method, however, is that columns are not delimited with <code>"</code> as one would get using <code>write.table</code>. </p>

<p>Is there a way to generate <code>"</code> delimited results table when a column of a data frame contains a list?</p>