I downloaded a timeline and have now a dataframe with 3200 observations of 1 variable (tweets). I want to filter my dataframe using certain keywords but don't get the expected results. Any help is most appreciated.
I tried this function, for example
filter(data.frame, grepl('keyword',text))
and I get one tweet matching my keyword but I know that there are more.
This worked for me
data<-read.csv("yourdata.csv") filter <- grep("keyword1|keyword2|keyword3", data$text, ignore.case=TRUE) Tweets_filtered <- data[filter,]
2.1m questions
2.1m answers
60 comments
57.0k users