Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9233733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:37:23+00:00 2026-06-18T06:37:23+00:00

Is there any way to fetch tweets over a specific time span (say, between

  • 0

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).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:37:24+00:00Added an answer on June 18, 2026 at 6:37 am

    In the package you’re using, the searchTwitter function takes the arguments since and until, defined in the documentation as follows:

    since If not NULL, restricts tweets to those since the given date.
    Date is to be formatted as YYYY-MM-DD

    until If not NULL, restricts tweets to those up until the given date.
    Date is to be formatted as YYYY-MM-DD

    Is that what you’re after? Or if you want to stick with the userTimeline function, you can subset the date range you want by operating on the created field of the status object that you get (so no need to use Excel).

    EDIT Here’s how you might subset on the created field if you’re using userTimeline:

    library(twitteR)
    # get last 100 tweets from the NSF
    tweets <- userTimeline('NSF', 100)
    # inspect structure of first item in the status object (ie. list of results)
    str(tweets[1])
    List of 1
     $ :Reference class 'status' [package "twitteR"] with 10 fields
      ..$ text        : chr "From the field: Avoiding a Cartography Catastrophe:  Study recommends new tools to improve global mapping of inf... http://t.co"| __truncated__
      ..$ favorited   : logi FALSE
      ..$ replyToSN   : chr(0) 
      ..$ created     : POSIXct[1:1], format: "2013-02-05 01:43:45"
      ..$ truncated   : logi FALSE
      ..$ replyToSID  : chr(0) 
      ..$ id          : chr "298607815617036288"
      ..$ replyToUID  : chr(0) 
      ..$ statusSource: chr "<a href=\"http://twitterfeed.com\" rel=\"nofollow\">twitterfeed</a>"
      ..$ screenName  : chr "NSF"
      ..and 34 methods, of which 23 are possibly relevant:
      ..  getCreated, getFavorited, getId, getReplyToSID, getReplyToSN,
      ..  getReplyToUID, getScreenName, getStatusSource, getText,
      ..  getTruncated, initialize, setCreated, setFavorited, setId,
      ..  setReplyToSID, setReplyToSN, setReplyToUID, setScreenName,
          ..  setStatusSource, setText, setTruncated, toDataFrame, usingMethods
    
    
    # convert status object to data frame for easier manipulation
    tweetsdf <- twListToDF(tweets)
    
    
     # subset by `created` field, eg get all tweets between 2 Feb and 5 Feb  
        subset(tweetsdf, created >= as.POSIXct('2013-02-02 00:00:00') & created <= as.POSIXct('2013-02-05 00:00:00'))
    

    And here’s the dataframe that results from that subset operation:

    text
    1   From the field: Avoiding a Cartography Catastrophe:  Study recommends new tools to improve global mapping of inf... http://t.co/F6IJ05Sb
    2                  Video: Research Vessel Sikuliaq launched... and now being prepared for her first Arctic run in 2014, http://t.co/D7GlRnlm
    3                                                                                        Who's watching the power grid? http://t.co/oYsgBl63
    4 Ice Melt &amp; the Ice Age... research story on #AAAS #Science Update Daily, featured show @Science360 Radio, http://t.co/XRXSdYL1 #Arctic
    5                                                                                             Taking LIGO to the people http://t.co/R2KHNQTB
    6                            Pubs: NSF Current - January-February 2013: Available Formats: JSP: http://t.co/2NhEEj6Q... http://t.co/ZSVABpXm
    7   Upcoming Due Dates: Interdisciplinary Research in Hazards and Disasters (Hazards SEES): Full Proposal Deadline D... http://t.co/IG3naAFs
    8                                                     When children learn to walk, their language improves dramatically http://t.co/FGYXSKu2
      favorited replyToSN             created truncated replyToSID
    1     FALSE        NA 2013-02-05 01:43:45     FALSE         NA
    2     FALSE        NA 2013-02-04 19:30:40     FALSE         NA
    3     FALSE        NA 2013-02-04 18:01:33     FALSE         NA
    4     FALSE        NA 2013-02-04 13:55:46     FALSE         NA
    5     FALSE        NA 2013-02-04 13:01:51     FALSE         NA
    6     FALSE        NA 2013-02-02 17:19:30     FALSE         NA
    7     FALSE        NA 2013-02-02 14:25:15     FALSE         NA
    8     FALSE        NA 2013-02-02 14:02:11     FALSE         NA
                      id replyToUID
    1 298607815617036288         NA
    2 298513923307630592         NA
    3 298491499958644736         NA
    4 298429645580288000         NA
    5 298416076012785666         NA
    6 297756138433290240         NA
    7 297712287521841156         NA
    8 297706485608218624         NA
                                                         statusSource
    1 <a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a>
    2 <a href="http://www.hootsuite.com" rel="nofollow">HootSuite</a>
    3 <a href="http://www.hootsuite.com" rel="nofollow">HootSuite</a>
    4 <a href="http://www.hootsuite.com" rel="nofollow">HootSuite</a>
    5 <a href="http://www.hootsuite.com" rel="nofollow">HootSuite</a>
    6 <a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a>
    7 <a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a>
    8 <a href="http://www.hootsuite.com" rel="nofollow">HootSuite</a>
      screenName
    1        NSF
    2        NSF
    3        NSF
    4        NSF
    5        NSF
    6        NSF
    7        NSF
    8        NSF
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way i can fetch start and time for my every job.
Is there any way we can fetch X509 Public Cetrificates using c# from AD
Is there any way to fetch the raw contents of a CSS file? Lets
I'm maintaining a legacy system (pre .NET). Is there any way to fetch the
With the current Wave API, is there any way to fetch the current state
Is there any efficient way to fetch texture data in a random way? That
Is there any way of limiting the amount of data CURL will fetch? I'm
Is there are way to fetch location/coordinate specific public posts using the facebook search
is there any way to fetch uncommited changes I left when I checkout out
Consider: print Hello print Goodbye Is there any way to fetch what was said

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.