Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

[FR] Adding tweet type #258

Open
msaeltzer opened this issue Dec 8, 2021 · 1 comment
Open

[FR] Adding tweet type #258

msaeltzer opened this issue Dec 8, 2021 · 1 comment

Comments

@msaeltzer
Copy link

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.

@chainsawriot
Copy link
Collaborator

chainsawriot commented Dec 8, 2021

@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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants