I'm a beginner using Rstudio. I made a document corpus and I want to tidy up my text. I used these codes, but the emoji/emoticons still appear when I view the table. In my original CSV file, the emoticons look something like this: 🤷â€â™‚ï. "Could anyone help?
# create corpus object
comments_corpus<- VCorpus(DataframeSource(txt))
#create copy of corpus
reviews<-comments_corpus
#removing non english words
toSpace <- content_transformer(function(x,pattern) gsub(pattern," ",x))
reviews <- tm_map(reviews, toSpace, "[^[:alpha:]]")
reviews <- tm_map(reviews, toSpace, "[^[:alnum:]]")
I tried googling and many forms of gsub, but to no avail.