Hi!
I was be able to extract tweets from twitter into R, using search_30days. However, I wanted to exclude the retweets, but got the error code 422 which means that something is wrong with the way I called it.
This is what I use:
´´´
dataBTC1 ← search_30day(“Bitcoin analysis lang:en -is:retweet”, n = 100, env_name = “Tweets30”, fromDate = “20220915000”, toDate = “202209152359”, parse = FALSE)
´´´
Moreover, I have converted the tweets from a list into a data frame by doing the following:
´´´
dataBTC1 ← search_30day(“Bitcoin analysis future lang:en”, n = 100, env_name = “Tweets30”, fromDate = “20220915000”, toDate = “202209152359”, parse = FALSE)
dfbtc1 ← do.call(rbind.data.frame, dataBTC1)
´´´
However, when I change my search query to:
´´´
dataBTC1 ← search_30day(“Bitcoin analysis on the market lang:en”, n = 100, env_name = “Tweets30”, fromDate = “20220915000”, toDate = “202209152359”, parse = FALSE)
dfbtc1 ← do.call(rbind.data.frame, dataBTC1)
´´´
I get the following error:
´´´
Warning: non-unique values when setting ‘row.names’: ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’Error in .rowNamesDF<-
(x, value = value) :
duplicate ‘row.names’ are not allowed
´´´
How can this be fixed? I also noticed that the first code results in a large list approx 2 mb and the second code results in a large list (16 elements, 2.9 mb). I assume it has something to do with this, but I dont know how to fix it.