This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################################################## | |
| # ADDRESSING https://github.com/AdamSpannbauer/lexRankr/issues/8 | |
| ################################################################## | |
| # GET EXAMPLE DATA | |
| #---------------------------------------------------------- | |
| library(xml2) | |
| library(rvest) | |
| options(stringsAsFactors = FALSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| get_timeline_df <- function(user, n_tweets=200, oauth_sig) { | |
| i <- 0 | |
| n_left <- n_tweets | |
| timeline_df <- NULL | |
| #loop until n_tweets are all got | |
| while (n_left > 0) { | |
| n_to_get <- min(200, n_left) | |
| i <- i+1 | |
| #incorporae max id in get_url (so as not to download same 200 tweets repeatedly) | |
| if (i==1) { |
NewerOlder