0

After I preprocessed my df_corpus and tried to convert the cleaned corpus to a TermDocumentMatrix, I keep getting this error:

feedbacks_tdm <- TermDocumentMatrix(df_corpus)

Error in UseMethod("TermDocumentMatrix", x) : no applicable method for 'TermDocumentMatrix' applied to an object of class "character"

MrFlick
  • 178,638
  • 15
  • 253
  • 268
Rosie612
  • 1
  • 2
  • 2
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. How exactly did you pre-process your data? `TermDocumentMatrix` expects a corpus but someone you've turned your corpus in to a character object (but you didn't include the relevant code in your question). – MrFlick Oct 04 '19 at 17:39
  • Thank you, i think my problem got solved after i added this line: survey – Rosie612 Oct 07 '19 at 16:33

0 Answers0