tweet_counts_recent function

Count tweets

Count tweets

tweet_counts_recent(query, ..., token = NULL, parse = TRUE, verbose = FALSE) tweet_counts_all(query, ..., token = NULL, parse = TRUE, verbose = FALSE)

Arguments

  • query: One query for matching Tweets.

  • ...: Other arguments passed to the API.

  • token: These endpoints only accept a bearer token (can be created via rtweet_app()). In most cases you are better of changing the default for all calls via auth_as().

  • parse: If TRUE, the default, returns a tidy data frame. Use FALSE

    to return the "raw" list corresponding to the JSON returned from the Twitter API.

  • verbose: A logical value to provide more information about the paginated queries (if any) and to store the data of each page.

Returns

The number of tweets for a given granularity

Examples

if (FALSE) { tcr <- tweet_counts_recent(query = "#rtweet", parse = FALSE) tca <- tweet_counts_all(query = "#rtweet", parse = FALSE) }

References

https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-all

https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-recent

  • Maintainer: Lluís Revilla Sancho
  • License: MIT + file LICENSE
  • Last published: 2024-02-24