How do I clean twitter data in R?

后端 未结 5 1349
醉话见心
醉话见心 2020-12-13 23:03

I extracted tweets from twitter using the twitteR package and saved them into a text file.

I have carried out the following on the corpus

xx<-tm         


        
5条回答
  •  既然无缘
    2020-12-13 23:26

    To remove the URLs you could try the following:

    removeURL <- function(x) gsub("http[[:alnum:]]*", "", x)
    xx <- tm_map(xx, removeURL)
    

    Possibly you could define similar functions to further transform the text.

提交回复
热议问题