1

I need to get tweets for a research project using R and specifically the package rtweet. I have my premium Twitter API ready and I can get tweets as data frames but what I cannot do is use the accounts of interests functions.

    tweets <- search_fullarchive("x", fromDate = 202101010000, toDate = 
202102010000, n = 20, env_name = "env_name", from:y, has:mentions)

But I get the following error,

Error in search_fullarchive("merkel", fromDate = 202101010000, toDate = 202102010000,  : 
  object 'from' not found

Does anyone know a way around this?

Nad Pat
  • 3,129
  • 3
  • 10
  • 20
Beyzanur
  • 11
  • 2

1 Answers1

-1

To do query you need environment name:

rt <- search_fullarchive("#rstats", n = 300, env_name = "research",
  fromDate = "201401010000", toDate = "201401312359")
mrbonewithgale
  • 100
  • 1
  • 7
  • I do have my environment name written I just didn't include it for privacy, the code works when I do not include the "from" element to it – Beyzanur Dec 09 '21 at 22:41