academictwitteR
academictwitteR copied to clipboard
[FR] Adding tweet type
Describe the solution you'd like
Adding columns if the tweet is a reply, retweet or quoted tweet. At the moment bind_tweets only contains retweet counts etc.
Anything else?
I wrote some helper functions that do this, could do a pull request.
@msaeltzer You know this right?
require(academictwitteR)
#> Loading required package: academictwitteR
res <- bind_tweets(system.file("extdata", "tweetdata", package = "academictwitteR"), output_format = "tidy")
res$in_reply_to_user_id
#> [1] NA NA NA
#> [4] NA NA NA
#> [7] NA NA NA
#> [10] NA NA "1238776140094996481"
#> [13] "970421608362934272" "2316172198" NA
#> [16] NA NA "771444093809467397"
#> [19] NA NA NA
#> [22] NA "47919307" "47919307"
#> [25] NA
res$sourcetweet_type
#> [1] "retweeted" "retweeted" "retweeted" "retweeted" "retweeted" NA
#> [7] NA NA NA NA NA NA
#> [13] NA NA NA NA NA NA
#> [19] NA NA NA NA NA NA
#> [25] "quoted"
Created on 2021-12-08 by the reprex package (v2.0.1)