How to search for multiple words in the same string using R

吃可爱长大的小学妹 提交于 2020-01-15 07:43:04

问题


I'm trying to extract tweets that contains 2-3 words in the same tweet.

Below is my code where I'm extracting tweets that matches a particular word. But I need to extract tweets that matches multiple words in the same tweet.

search.string <- "#DeltaAirlines"
no.of.tweets<-1500
tweets <- unique(searchTwitter(search.string, n=no.of.tweets, lang="en"))

I've tried using AND in the search.string function but its returning me an empty list even though there are tweets that contain those 2-3 words.

来源:https://stackoverflow.com/questions/37684179/how-to-search-for-multiple-words-in-the-same-string-using-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!