Is there any way to fetch tweets over a specific time span (say, between December and January) with twitteR rather than simply the past N tweets (as in with tweets <- UserTimeline(user, n = 1000) ?
Or is that not possible using the TwitteR library? (meaning that you have to use something like Excel to subset a large number of tweets by date).
In the package you’re using, the
searchTwitterfunction takes the argumentssinceanduntil, defined in the documentation as follows:Is that what you’re after? Or if you want to stick with the
userTimelinefunction, you can subset the date range you want by operating on thecreatedfield of thestatusobject that you get (so no need to use Excel).EDIT Here’s how you might subset on the
createdfield if you’re usinguserTimeline:And here’s the dataframe that results from that subset operation: