rtweet

How to define search queries in rtweet fullarchive and 30day search

你离开我真会死。 提交于 2021-02-11 15:38:11
问题 It's not in the Rtweet-documentation how to do this properly with the additional operators available for search_fullarchive and search_30days. It just says that the string should follow directly after the operator: , for example: place:California. And that OR can be used to search for multiple phrases. My attempts: queryohio <- '(place:OH OR place:Ohio OR place:Columbus)(corona OR covid19 OR virus)' queryohio2 <- 'corona OR covid19 OR virus place:Ohio OR place:Columbus OR place:OH'

'Could not authenticate you' when using search_tweets function in rtweet package?

隐身守侯 提交于 2021-01-29 06:54:41
问题 I encountered another problem when using rTweet. Here is my code. consumer_key <-"*****" consumer_secret <- "*****" access_token<-"*****" access_secret <- "*****" my_app <- '*****' twitter_tokens <- rtweet::create_token(app = my_app, consumer_key = consumer_key, consumer_secret = consumer_secret, access_token = access_token, access_secret = access_secret) #install_github('Stat',force = T) devtools::install_github('mkearney/rtweet') #install.packages('rtweet') library(rtweet)#packageVersion(

Write tweets from rtweets package to csv

六眼飞鱼酱① 提交于 2020-04-11 18:32:24
问题 I'm unable to write tweets from search_tweet() in 'rtweet' package to csv. It throws the following error: Here's a link to the question I previously asked, that has details on the type of search_tweet() object creates: Class and type of object is different in R. How should I make it consistent? How should I write this files as csv? library(rtweet) comments <- search_tweets( queryString, include_rts = FALSE, n = 18000, type = "recent", retryonratelimit = FALSE) write_csv(comments, "comments

Class and type of object is different in R. How should I make it consistent?

自闭症网瘾萝莉.ら 提交于 2020-03-26 03:52:11
问题 I downloaded some tweets using 'rtweet' library. Its search_tweets() function creates a list (type) object, while its class is "tbl_df" "tbl" "data.frame". To further work on it, I need to convert this search_tweets() output into a dataframe. comments <- search_tweets( queryString, include_rts = FALSE, n = 18000, type = "recent", retryonratelimit = FALSE) typeof(comments) list class(comments) "tbl_df" "tbl" "data.frame" I tried to convert list into dataframe by using as.data.frame(), that

R Find all replies to a user's tweets from their follower list

…衆ロ難τιáo~ 提交于 2019-12-22 17:40:02
问题 I'm trying to find out the number of replies for all given tweets by a user. This is not something avaiable directly from Twitter's API. I've decided to only go after replies from a user's followers, to help distill down the data generated and as a good approximation (I believe msot of the replies to a tweet will come directly from that users followers. I believe I've come a long way already, I jsut need help with the final section. I'm struggling to make the function I've created run over

R Authentication error when looping search_tweets function (rtweet package) over vector of Twitter handles

与世无争的帅哥 提交于 2019-12-12 07:36:41
问题 I've created a loop that runs through a vector of Twitter handles, and collects tweets from them using the search_tweets function from the rtweet package. Downloading the latest version of rtweet ## install devtools package if it's not already if (!requireNamespace("devtools", quietly = TRUE)) { install.packages("devtools") } ## install dev version of rtweet from github devtools::install_github("mkearney/rtweet") library(rtweet) Creating token ## autheticate via web browser token=create_token

R Find all replies to a user's tweets from their follower list

半世苍凉 提交于 2019-12-06 14:30:18
I'm trying to find out the number of replies for all given tweets by a user. This is not something avaiable directly from Twitter's API. I've decided to only go after replies from a user's followers, to help distill down the data generated and as a good approximation (I believe msot of the replies to a tweet will come directly from that users followers. I believe I've come a long way already, I jsut need help with the final section. I'm struggling to make the function I've created run over all the followers. I'd rather this solution be in R over Python, although I know this exists and will be

R Authentication error when looping search_tweets function (rtweet package) over vector of Twitter handles

家住魔仙堡 提交于 2019-12-03 07:18:28
I've created a loop that runs through a vector of Twitter handles, and collects tweets from them using the search_tweets function from the rtweet package. Downloading the latest version of rtweet ## install devtools package if it's not already if (!requireNamespace("devtools", quietly = TRUE)) { install.packages("devtools") } ## install dev version of rtweet from github devtools::install_github("mkearney/rtweet") library(rtweet) Creating token ## autheticate via web browser token=create_token( app = "My_app", consumer_key = "My Consumer Key", consumer_secret = "My Secret Code",set_renv = FALSE