title: R tm package vcorpus: Error in converting corpus to data frame
body: <p>I am using the <code>tm</code> package to clean up some data using the following code:</p>
  
  <pre><code>mycorpus &lt;- Corpus(VectorSource(x))
  mycorpus &lt;- tm_map(mycorpus, removePunctuation)
  </code></pre>
  
  <p>I then want to convert the corpus back into a data frame in order to export a text file that contains the data in the original format of a data frame. I have tried the following:</p>
  
  <pre><code>dataframe &lt;- as.data.frame(mycorpus)
  </code></pre>
  
  <p>But this returns an error:</p>
  
  <blockquote>
    <p>"Error in as.data.frame.default.(mycorpus) : cannot coerce class "c(vcorpus, > corpus")" to a data.frame</p>
  </blockquote>
  
  <p>How can I convert a corpus into a data frame? </p>