Retrieve tweets and store locally

get_and_store(
  query = "#rspatial",
  n_tweets = 20,
  dir = ".",
  tweets_file = "tweets_rspatial.rds",
  complete_tweets_file = "complete_tweets_rspatial.rds",
  log = TRUE,
  logfile = "rtweet_console.log",
  loop_pid_file = "loop_pid.log",
  token = NULL,
  hashtags_max = 5,
  hashtag_stopwords = "robot"
)

Arguments

query

search tweet query

n_tweets

n_tweets

dir

Path where everything will be saved

tweets_file

tweets_file path name relative to dir

complete_tweets_file

complete_tweets_file path name relative to dir

log

Logical

logfile

logfile path name relative to dir

loop_pid_file

loop_pid_file path name relative to dir

token

Every user should have their own Oauth (Twitter API) token. By default token = NULL this function looks for the path to a saved Twitter token via environment variables (which is what 'create_token()' sets up by default during initial token creation). For instruction on how to create a Twitter token see the tokens vignette, i.e., 'vignettes("auth", "rtweet")'.

hashtags_max

Maximum number of hashtags allowed in tweets

hashtag_stopwords

Hashtags that you dont want to retweet