I'm trying to read in a csv and then clean it up before I can work with the data. Every line of code after the VectorSouce line (didn't include them all) gives an error, not a warning. I cannot figure out how to fix the code to get it to work. Below are the errors I get. I included a screenshot of the data if that helps, I'm relatively new to coding so any help is greatly appreciated!
Below is the code:
#Load in data
ReviewData <- read_csv("Desktop/deception_data_final.csv")
ReviewCorpus<-Corpus(VectorSource(ReviewData$review))
ReviewCorpus<-tm_map(ReviewCorpus, content_transformer(tolower))
ReviewCorpus<-tm_map(ReviewCorpus, removePunctuation)
ReviewCorpus<-tm_map(ReviewCorpus, removeWords, c(stopwords("english")))
The errors I get:
Error in tm_map.SimpleCorpus(ReviewCorpus, content_transformer(tolower)) :
(converted from warning) transformation drops documents
ReviewCorpus<-tm_map(ReviewCorpus, removeNumbers)
Error in tm_map.SimpleCorpus(ReviewCorpus, removeNumbers) :
(converted from warning) transformation drops documents
Screenshot of the data for reference:
