title: Unable to convert a Corpus to Data Frame in R
body: <p>I've looked at the other similar questions that have been posted here (like <a href="https://stackoverflow.com/questions/24703920/r-tm-package-vcorpus-error-in-converting-corpus-to-data-frame">this</a>), but the problem persists.</p>
  
  <p>I have a dataframe of textual data, which I need to stem. So I'm converting it into a corpus, stemming it, then completing the words from the stems, and then trying to get a dataframe of text as output.</p>
  
  <pre><code>myCorpus &lt;- Corpus(VectorSource(textDf$text))
  myCorpus &lt;- tm_map(myCorpus, removeWords, stopwords('english'))
  myCorpus &lt;- tm_map(myCorpus, content_transformer(tolower))
  myCorpus &lt;- tm_map(myCorpus, removePunctuation)
  dictCorpus &lt;- myCorpus
  myCorpus &lt;- tm_map(myCorpus, stemDocument)
  myCorpus &lt;- tm_map(myCorpus, stemCompletion, dictionary=dictCorpus)
  </code></pre>
  
  <p>Now I'm trying to get a dataframe back from this corpus so I've tried these following commands.</p>
  
  <p><code>dataframe&lt;-data.frame(text=unlist(sapply(myCorpus, '[', "content")), 
                        stringsAsFactors=F)</code></p>
  
  <p>and </p>
  
  <p><code>dataframe&lt;-data.frame(text=unlist(sapply(myCorpus,</code>[<code>)), stringsAsFactors=F)</code></p>
  
  <p>and also</p>
  
  <pre><code>dataframe &lt;- 
      data.frame(id=sapply(corpus, meta, "id"),
                 text=unlist(lapply(sapply(corpus, '[', "content"),paste,collapse="\n")),
                 stringsAsFactors=FALSE)
  </code></pre>
  
  <p>from <a href="https://stackoverflow.com/questions/32036391/how-to-convert-corpus-to-data-frame-with-meta-data-in-r">this</a> link</p>
  
  <p>All of them produce the following error:</p>
  
  <pre><code>Error in UseMethod("meta", x) : 
    no applicable method for 'meta' applied to an object of class "character"
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>