Skip to contents

This function is useful because Google Sheets (and hence TAGS) typically round very large numbers into an exponential form. Thus, because status ID numbers are very large, they often get corrupted in this rounding process. The most reliable way to get full status ID numbers is by using this function, get_char_tweet_ids(), to pull the ID numbers from the URL linking to specific statuses.

Usage

get_char_tweet_ids(x)

Arguments

x

A dataframe containing the column name 'status_url' (i.e., the hyperlink to specific statuses), such as that returned by read_tags(), or a vector of status URLs, such as as those contained in the 'status_url' column of a dataframe returned by tidytags::read_tags()

Value

A vector of Twitter status IDs as character strings

Examples


# \donttest{
example_url <- "18clYlQeJOc6W5QRuSlJ6_v3snqKJImFhU42bRkM_OX8"
tags_content <- read_tags(example_url)
#>  Reading from "#aect19 tweet collector".
#>  Range ''Archive''.
get_char_tweet_ids(tags_content[1:10, ])
#>  [1] "1251954312772812801" "1248064163211096064" "1234206946732830720"
#>  [4] "1229405350178127872" "1227652243870097408" "1225505187453964288"
#>  [7] "1225137879921385472" "1225122317849657345" "1219758386436165633"
#> [10] "1219043574555299840"
get_char_tweet_ids(tags_content$status_url[1:10])
#>  [1] "1251954312772812801" "1248064163211096064" "1234206946732830720"
#>  [4] "1229405350178127872" "1227652243870097408" "1225505187453964288"
#>  [7] "1225137879921385472" "1225122317849657345" "1219758386436165633"
#> [10] "1219043574555299840"
get_char_tweet_ids(
  "https://twitter.com/tweet__example/status/1176592704647716864")
#> [1] "1176592704647716864"
# }